diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..0650a664fc --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +--- +on: [push, pull_request] +name: Build + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + name: build + steps: + - uses: actions/checkout@v3 + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: 1.20.0 + - run: go build ./... + + tidy: + runs-on: ubuntu-latest + name: tidy + steps: + - uses: actions/checkout@v3 + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: 1.20.0 + - run: | + go mod tidy + CHANGES_IN_REPO=$(git status --porcelain) + if [[ -n "$CHANGES_IN_REPO" ]]; then + echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:" + git status && git --no-pager diff + exit 1 + fi diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml new file mode 100644 index 0000000000..f94e29a797 --- /dev/null +++ b/.github/workflows/codacy.yml @@ -0,0 +1,61 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow checks out code, performs a Codacy security scan +# and integrates the results with the +# GitHub Advanced Security code scanning feature. For more information on +# the Codacy security scan action usage and parameters, see +# https://github.com/codacy/codacy-analysis-cli-action. +# For more information on Codacy Analysis CLI in general, see +# https://github.com/codacy/codacy-analysis-cli. + +name: Codacy Security Scan + +on: + push: + branches: [ "main", "release/v*" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main", "release/v*" ] + schedule: + - cron: '24 14 * * 5' + +permissions: + contents: read + +jobs: + codacy-security-scan: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + name: Codacy Security Scan + runs-on: ubuntu-latest + steps: + # Checkout the repository to the GitHub Actions runner + - name: Checkout code + uses: actions/checkout@v3 + + # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis + - name: Run Codacy Analysis CLI + uses: codacy/codacy-analysis-cli-action@d43127fe38d20c527dc1951ae5aea23148bab738 + with: + # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository + # You can also omit the token and run the tools that support default configurations + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + verbose: true + output: results.sarif + format: sarif + # Adjust severity of non-security issues + gh-code-scanning-compat: true + # Force 0 exit code to allow SARIF file generation + # This will handover control about PR rejection to the GitHub side + max-allowed-issues: 2147483647 + + # Upload the SARIF file generated in the previous step + - name: Upload SARIF results file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: results.sarif diff --git a/.github/workflows/codeql-cosmos.yml b/.github/workflows/codeql-cosmos.yml new file mode 100644 index 0000000000..b66b8ee844 --- /dev/null +++ b/.github/workflows/codeql-cosmos.yml @@ -0,0 +1,40 @@ +name: "CodeQL for cosmos" + +on: + pull_request: + paths: + - "**.go" + push: + branches: + - main + - release/v* + paths: + - "**.go" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.20.0 + # 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 + + - name: Build + run: make build + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..d3289f3918 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,40 @@ +name: "CodeQL" + +on: + pull_request: + paths: + - "**.go" + push: + branches: + - main + - release/v* + paths: + - "**.go" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.19 + # 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 + + - name: Build + run: make build + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000000..b0dedc42e0 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,20 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v3 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v3 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000000..527164aab1 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,23 @@ +--- +name: Build Docker Image on PR + +on: + pull_request: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build without push + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64 + push: false + build-args: arch=x86_64 \ No newline at end of file diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000000..24d4523ebc --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,34 @@ +--- +name: golangci-lint +on: + push: + tags: + - v* + branches: + - release/v* + - main + pull_request: +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.20.0 + - uses: actions/checkout@v3 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest + args: --timeout 10m diff --git a/.github/workflows/proto-buf-publisher.yml b/.github/workflows/proto-buf-publisher.yml index 03bffe4b2c..e72346ec24 100644 --- a/.github/workflows/proto-buf-publisher.yml +++ b/.github/workflows/proto-buf-publisher.yml @@ -6,7 +6,7 @@ on: branches: - main paths: - - 'proto/**' + - "proto/**" # Sequence of patterns matched against refs/tags tags: @@ -22,7 +22,7 @@ jobs: # lint checks - uses: bufbuild/buf-lint-action@v1 with: - input: 'proto' + input: "proto" # TODO: Add this when project is more stable. # backward compatibility breaking checks @@ -34,5 +34,5 @@ jobs: # publish proto files - uses: bufbuild/buf-push-action@v1 with: - input: 'proto' - buf_token: ${{ secrets.BUF_TOKEN }} \ No newline at end of file + input: "proto" + buf_token: ${{ secrets.BUF_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000..2704f6dfe7 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,21 @@ +--- +on: [push, pull_request] +name: Test + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + name: test + steps: + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: 1.20.0 + - name: Checkout code + uses: actions/checkout@v3 + - name: Test + run: go test ./... diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000000..e5306c8dc5 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,9 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file) +# and commit this file to your remote git repository to share the goodness with others. + +tasks: + - init: go get && go build ./... && go test ./... && make + command: go run + + diff --git a/.golangci.yml b/.golangci.yml index 17d5384ea3..46a0a0ca69 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,63 +1,82 @@ run: - tests: false + tests: true + # timeout for analysis, e.g. 30s, 5m, default is 1m + timeout: 5m linters: disable-all: true enable: - - bodyclose - - deadcode - depguard - dogsled - errcheck + - exportloopref - goconst - gocritic - - gofmt - - goimports - - revive + - gofumpt - gosec - gosimple - govet - ineffassign - misspell - nakedret - - prealloc - - exportloopref + - nolintlint + - revive - staticcheck - - structcheck - stylecheck - typecheck - unconvert + - unparam - unused - - varcheck + +# TODO: fix the sdkerrors.Wrap deprecation warning and re-enable staticcheck issues: exclude-rules: + - text: "Error return value of `flagSet.Set` is not checked" + linters: + - errcheck + - text: "SA1019: sdkerrors.Wrapf is deprecated: functionality of this package has been moved to it's own module" + linters: + - staticcheck + - text: "sdkerrors.Error is deprecated: the type has been moved to cosmossdk.io/errors module" + linters: + - staticcheck + - text: "sdkerrors.Wrap is deprecated: functionality of this package has been moved to it's own module" + linters: + - staticcheck - text: "Use of weak random number generator" linters: - gosec + - text: "comment on exported var" + linters: + - golint + - text: "don't use an underscore in package name" + linters: + - golint - text: "ST1003:" linters: - stylecheck + # FIXME: Disabled until golangci-lint updates stylecheck with this fix: + # https://github.com/dominikh/go-tools/issues/389 + - text: "ST1016:" + linters: + - stylecheck + - path: "migrations" + text: "SA1019:" + linters: + - staticcheck + + max-issues-per-linter: 10000 + max-same-issues: 10000 linters-settings: dogsled: max-blank-identifiers: 3 - errcheck: - # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; - # default is false: such cases aren't reported by default. - check-blank: true maligned: # print struct with more effective memory layout or not, false by default suggest-new: true - golint: - # minimal confidence for issues, default is 0.8 - min-confidence: 0 - prealloc: - # XXX: we don't recommend using this linter before doing performance profiling. - # For most programs usage of prealloc will be a premature optimization. - - # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. - # True by default. - simple: false - range-loops: true # Report preallocation suggestions on range loops, true by default - for-loops: true # Report preallocation suggestions on for loops, false by default + nolintlint: + allow-unused: false + allow-leading-space: true + require-explanation: false + require-specific: false diff --git a/CHANGELOG.md b/CHANGELOG.md index fc214dfac4..ad4edda64d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,47 +2,12 @@ ## [Unreleased](https://github.com/CosmWasm/wasmd/tree/HEAD) -[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.31.0...HEAD) - -## [v0.31.0](https://github.com/CosmWasm/wasmd/tree/v0.31.0) (2023-03-13) - -[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.30.0...v0.31.0) - -- Upgrade wasmvm to v1.2.1 [\#1245](https://github.com/CosmWasm/wasmd/pull/1245), see [wasmvm v1.2.1](https://github.com/CosmWasm/wasmvm/releases/tag/v1.2.1) -- Fix checksum check for zipped gov store proposals [\#1232](https://github.com/CosmWasm/wasmd/issues/1232) -- Return IBC packet sequence number in the handler plugin [\#1154](https://github.com/CosmWasm/wasmd/issues/1154) -- Add Windows client-side support [\#1169](https://github.com/CosmWasm/wasmd/issues/1169) -- Upgrade Cosmos-SDK to [v0.45.14](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.14) -- Add missing events for admin-related methods [\#1173](https://github.com/CosmWasm/wasmd/issues/1173) -- Disallow storing new codes with ACCESS\_TYPE\_ONLY\_ADDRESS [\#1144](https://github.com/CosmWasm/wasmd/issues/1144) -- Support builds without CGO [\#1129](https://github.com/CosmWasm/wasmd/issues/1129) -- Wasmd does not sort coins when converting from CosmWasm Coins to SDK - Coins [\#1118](https://github.com/CosmWasm/wasmd/issues/1118) -- Add InstantiateContract2Proposal [\#1062](https://github.com/CosmWasm/wasmd/issues/1062) -- CLI: Allow using key name for --admin [\#1039](https://github.com/CosmWasm/wasmd/issues/1039) -- More gov proposal simulations [\#1107](https://github.com/CosmWasm/wasmd/pull/1107) -- Remove genesis messages [\#987](https://github.com/CosmWasm/wasmd/issues/987) -- Update instantiate config command [\#843](https://github.com/CosmWasm/wasmd/issues/843) -- Upgrade IBC-go to [v4.3.0](https://github.com/cosmos/ibc-go/releases/tag/v4.3.0) [\#1180](https://github.com/CosmWasm/wasmd/pull/1180) -- Upgrade ICA to [v0.2.6](https://github.com/cosmos/interchain-accounts-demo/releases/tag/v0.2.6) [\#1192](https://github.com/CosmWasm/wasmd/pull/1192) - -### Notable changes: -- Genesis messages were deprecated before and are removed with this release -- New `cosmwasm_1_2` [capability](https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md) to - enable new features: - - Support for `gov.MsgVoteWeighted`, `wasm.Instantiate2` messages - - code info query for contracts -- See "State Machine Breaking" changes in [IBC-go](https://github.com/cosmos/ibc-go/releases/tag/v4.3.0) -- See notes about the "store fix" in [Cosmos-sdk](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.12) -- Wasmd can now be used as a library without CGO -- Wasmd client can now be used on Windows - -### Migration notes: -- This release does not include any state migrations but breaking changes that require a coordinated chain upgrade +[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.30.0...HEAD) ## [v0.30.0](https://github.com/CosmWasm/wasmd/tree/v0.30.0) (2022-12-02) [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.29.2...v0.30.0) + - Provide source, builder and codehash information in store code proposal message[\#1072](https://github.com/CosmWasm/wasmd/pull/1072) - Add new CLI query/ endpoint to get contracts by creator address [\#998](https://github.com/CosmWasm/wasmd/pull/998) - Upgrade to Go v1.19 [\#1044](https://github.com/CosmWasm/wasmd/pull/1044) @@ -53,13 +18,15 @@ - StoreAndInstantiate gov proposal [\#785](https://github.com/CosmWasm/wasmd/issues/785) - Start developer guide for contributors [\#654](https://github.com/CosmWasm/wasmd/issues/654) -### Notable changes: +### Notable changes + - IBC fee middleware is setup in `app.go`. Please note that it can be enabled with new channels only. A nice read is this [article](https://medium.com/the-interchain-foundation/ibc-relaying-as-a-service-the-in-protocol-incentivization-story-2c008861a957). - Authz for wasm contracts can be granted via `wasmd tx wasm grant` and executed via `wasmd tx authz exec` command - Go v1.19 required to prevent a mixed chain setup with older versions. Just to be on the safe side. - Store code proposal types have new metadata fields added that can help to build client side tooling to verify the wasm contract in the proposal -### Migration notes: +### Migration notes + - The wasmd module version was bumped and a [state migration](https://github.com/CosmWasm/wasmd/pull/1021/files#diff-4357c2137e24f583b8f852cc210320cb71af18e2fdfb8c21b55d8667cfe54690R20) registered. - See ibc-go [migration notes](https://github.com/cosmos/ibc-go/blob/v4.2.0/docs/migrations) - See interchain-accounts [`MsgRegisterAccount.Version` field](https://github.com/cosmos/interchain-accounts-demo/compare/v0.1.0...v0.2.4#diff-ac8bca25810de6d3eef95f74fc9acf2223f3687822e6227b584e0d3b40db6566). Full diff [v0.1.0 to v0.2.4](https://github.com/cosmos/interchain-accounts-demo/compare/v0.1.0...v0.2.4) @@ -75,12 +42,13 @@ ## [v0.29.0](https://github.com/CosmWasm/wasmd/tree/v0.29.0) (2022-10-10) [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.28.0...v0.29.0) + - Add dependencies for protobuf and remove third_party forlder [/#1030](https://github.com/CosmWasm/wasmd/pull/1030) -- Check wasmvm version on startup [\#1029](https://github.com/CosmWasm/wasmd/pull/1029/) +- Check wasmvm version on startup [\#1029](https://github.com/CosmWasm/wasmd/pull/1029/) - Allow AccessConfig to use a list of addresses instead of just a single address [\#945](https://github.com/CosmWasm/wasmd/issues/945) - Make contract addresses predictable \("deterministic"\) [\#942](https://github.com/CosmWasm/wasmd/issues/942) - Add query for the total supply of a coin [\#903](https://github.com/CosmWasm/wasmd/pull/903) ([larry0x](https://github.com/larry0x)) -- Upgrade go to v1.18 [\#866]https://github.com/CosmWasm/wasmd/pull/866/) ([faddat](https://github.com/faddat)) +- Upgrade go to v1.18 [\#866] ([faddat](https://github.com/faddat)) - Upgrade to ibc-go v3.3.0 REQUIRES [MIGRATION](https://github.com/cosmos/ibc-go/blob/v3.2.3/docs/migrations/support-denoms-with-slashes.md) [\#1016](https://github.com/CosmWasm/wasmd/pull/1016) - Upgrade to cosmos-sdk v0.45.8 [\#964](https://github.com/CosmWasm/wasmd/pull/964/) ([faddat](https://github.com/faddat)) - Upgrade wasmvm to v1.1.1 [\#1012](https://github.com/CosmWasm/wasmd/pull/1012), see [wasmvm v1.1.1](https://github.com/CosmWasm/wasmvm/releases/tag/v1.1.1) @@ -94,17 +62,18 @@ - Prevent migration to a restricted code [\#900](https://github.com/CosmWasm/wasmd/pull/900) - Charge gas to unzip wasm code [\#898](https://github.com/CosmWasm/wasmd/pull/898) -### Notable changes: +### Notable changes + - BaseAccount and pruned vesting account types can be re-used for contracts addresses - A new [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/pull/1014/files#diff-bf58b9da4b674719f07dd5421c532c1ead13a15f8896b59c1f724215d2064b73R75) was introduced which is an additional value for `message` type events - Store event contains a new attribute with the code checksum now - New `wasmd tx wasm instantiate2` CLI command for predictable addresses on instantiation -- New `cosmwasm_1_1` CosmWasm capability (former "feature") was introduced in [cosmwasm/#1356](https://github.com/CosmWasm/cosmwasm/pull/1356) to support total supply queries +- New `cosmwasm_1_1` CosmWasm capability (former "feature") was introduced in [cosmwasm/#1356](https://github.com/CosmWasm/cosmwasm/pull/1356) to support total supply queries - Protobuf files are published to [buf.build](https://buf.build/cosmwasm/wasmd/docs/main:cosmwasm.wasm.v1) -### Migration notes: -- See ibc-go [migration notes](https://github.com/cosmos/ibc-go/blob/v3.3.0/docs/migrations/support-denoms-with-slashes.md) +### Migration notes +- See ibc-go [migration notes](https://github.com/cosmos/ibc-go/blob/v3.3.0/docs/migrations/support-denoms-with-slashes.md) ## [v0.28.0](https://github.com/CosmWasm/wasmd/tree/v0.28.0) (2022-07-29) @@ -120,11 +89,11 @@ No Migration notes: -* Contracts can no longer parse events from any calls except if they call another contract (or instantiate it, migrate it, etc). +- Contracts can no longer parse events from any calls except if they call another contract (or instantiate it, migrate it, etc). The main issue here is likely "Custom" queries from a blockchain, which want to send info (eg. how many tokens were swapped). Since those custom bindings are maintained by the chain, they can use the data field to pass any deterministic information back to the contract. We recommend using JSON encoding there with some documented format the contracts can parse out easily. -* For possible non-determinism issues, we also sort all attributes in events. Better safe than sorry. +- For possible non-determinism issues, we also sort all attributes in events. Better safe than sorry. ## [v0.27.0](https://github.com/CosmWasm/wasmd/tree/v0.27.0) (2022-05-19) @@ -139,6 +108,7 @@ Yes - Fix SudoContractProposal and ExecuteContractProposal [\#808](https://github.com/CosmWasm/wasmd/pull/808) ([the-frey](https://github.com/the-frey)) **Implemented Enhancements** + - Add UpdateInstantiateConfig governance proposal [\#820](https://github.com/CosmWasm/wasmd/pull/796) ([jhernandezb](https://github.com/jhernandezb)) - Upgrade wasmvm to v1.0.0 [\#844](https://github.com/CosmWasm/wasmd/pull/844) and [\#858](https://github.com/CosmWasm/wasmd/pull/858) - Support state sync [\#478](https://github.com/CosmWasm/wasmd/issues/478) @@ -177,9 +147,11 @@ Yes ## [v0.25.0](https://github.com/CosmWasm/wasmd/tree/v0.25.0) (2022-04-06) **API Breaking** + - Upgrade wasmvm to v1.0.0-beta10 [\#790](https://github.com/CosmWasm/wasmd/pull/790), [\#800](https://github.com/CosmWasm/wasmd/pull/800) **Implemented Enhancements** + - Fix: close iterators [\#792](https://github.com/CosmWasm/wasmd/pull/792) - Use callback pattern for contract state iterator [\#794](https://github.com/CosmWasm/wasmd/pull/794) - Bump github.com/stretchr/testify from 1.7.0 to 1.7.1 [\#787](https://github.com/CosmWasm/wasmd/pull/787) @@ -190,16 +162,19 @@ Yes ## [v0.24.0](https://github.com/CosmWasm/wasmd/tree/v0.24.0) (2022-03-09) **API Breaking** + - Add cosmwasm project prefix to REST query paths [\#743](https://github.com/CosmWasm/wasmd/issues/743) - Add support for old contract addresses of length 20 [\#758](https://github.com/CosmWasm/wasmd/issues/758) - Update wasmvm to 1.0.0-beta7 (incl wasmer 2.2) [\#774](https://github.com/CosmWasm/wasmd/issues/774) **Fixed bugs** + - Add missing colons in String of some proposals [\#752](https://github.com/CosmWasm/wasmd/pull/752) - Replace custom codec with SDK codec (needed for rosetta) [\#760](https://github.com/CosmWasm/wasmd/pull/760) - Support `--no-admin` flag on cli for gov instantiation [\#771](https://github.com/CosmWasm/wasmd/pull/771) **Implemented Enhancements** + - Add support for Buf Build [\#753](https://github.com/CosmWasm/wasmd/pull/753), [\#755](https://github.com/CosmWasm/wasmd/pull/755), [\#756](https://github.com/CosmWasm/wasmd/pull/756) - Redact most errors sent to contracts, for better determinism guarantees [\#765](https://github.com/CosmWasm/wasmd/pull/765), [\#775](https://github.com/CosmWasm/wasmd/pull/775) @@ -208,6 +183,7 @@ Yes ## [v0.23.0](https://github.com/CosmWasm/wasmd/tree/v0.23.0) (2022-01-28) **Fixed bugs** + - Set end block order [\#736](https://github.com/CosmWasm/wasmd/issues/736) [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.22.0...v0.23.0) @@ -215,10 +191,12 @@ Yes ## [v0.22.0](https://github.com/CosmWasm/wasmd/tree/v0.22.0) (2022-01-20) **Api Breaking:** + - Upgrade to cosmos-sdk v0.45.0 [\#717](https://github.com/CosmWasm/wasmd/pull/717) - Upgrade wasmvm to v1.0.0-beta5 [\#714](https://github.com/CosmWasm/wasmd/pull/714) **Implemented Enhancements:** + - Use proper SystemError::NoSuchContract on ContractInfo if missing [\#687](https://github.com/CosmWasm/wasmd/issues/687) - Benchmark tests flickering: directory not empty [\#659](https://github.com/CosmWasm/wasmd/issues/659) - Implement PinCode and UnpinCode proposal client handlers [\#707](https://github.com/CosmWasm/wasmd/pull/707) ([orkunkl](https://github.com/orkunkl)) @@ -233,16 +211,17 @@ Yes [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.21.0...v0.22.0) - ## [v0.21.0](https://github.com/CosmWasm/wasmd/tree/v0.21.0) (2021-11-17) [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.20.0...v0.21.0) **Fixed bugs + Api Breaking:** + - Prevent infinite gas consumption in simulation queries [\#670](https://github.com/CosmWasm/wasmd/issues/670) - Amino JSON representation of inner message in Msg{Instantiate,Migrate,Execute}Contract [\#642](https://github.com/CosmWasm/wasmd/issues/642) **Implemented Enhancements:** + - Bump wasmvm to v1.0.0-beta2 [\#676](https://github.com/CosmWasm/wasmd/pull/676) - Add Benchmarks to compare with native modules [\#635](https://github.com/CosmWasm/wasmd/issues/635) - Document M1 is not supported [\#653](https://github.com/CosmWasm/wasmd/issues/653) @@ -263,6 +242,7 @@ Yes - Add capabilities to begin block [\#626](https://github.com/CosmWasm/wasmd/pull/626) **Api Breaking:** + - Update to wasmvm 1.0.0-soon2 [\#624](https://github.com/CosmWasm/wasmd/issues/624) **Implemented Enhancements:** @@ -288,6 +268,7 @@ Yes - Fix bug in query handler initialization on reply [\#604](https://github.com/CosmWasm/wasmd/issues/604) **Api Breaking:** + - Bump Go version to 1.16 [\#612](https://github.com/CosmWasm/wasmd/pull/612) **Implemented Enhancements:** @@ -304,6 +285,7 @@ Yes [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.17.0...v0.18.0) **Api Breaking:** + - Events documented and refactored [\#448](https://github.com/CosmWasm/wasmd/issues/448), [\#589](https://github.com/CosmWasm/wasmd/pull/589), [\#587](https://github.com/CosmWasm/wasmd/issues/587) - Add organisation to grpc gateway path [\#578](https://github.com/CosmWasm/wasmd/pull/578) - Move Proto version from `v1beta1` to `v1` for all cosmwasm.wasm.* types @@ -317,7 +299,8 @@ Yes [\#565](https://github.com/CosmWasm/wasmd/pull/565) **Implemented Enhancements:** -- Cosmos SDK 0.42.9, wasmvm 0.16.0 [\#582](https://github.com/CosmWasm/wasmd/pull/582) + +- Cosmos SDK 0.42.9, wasmvm 0.16.0 [\#582](https://github.com/CosmWasm/wasmd/pull/582) - Better ibc contract interface [\#570](https://github.com/CosmWasm/wasmd/pull/570) ([ethanfrey](https://github.com/ethanfrey)) - Reject invalid events/attributes returned from contracts [\#560](https://github.com/CosmWasm/wasmd/pull/560) - IBC Query methods from Wasm contracts only return OPEN channels [\#568](https://github.com/CosmWasm/wasmd/pull/568) @@ -332,6 +315,7 @@ Yes [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.16.0...v0.17.0) **Features:** + - Remove json type cast for contract msgs [\#520](https://github.com/CosmWasm/wasmd/pull/520) ([alpe](https://github.com/alpe)) - Bump github.com/cosmos/cosmos-sdk from 0.42.4 to 0.42.5 [\#519](https://github.com/CosmWasm/wasmd/pull/519) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) @@ -340,6 +324,7 @@ Yes [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.15.1...v0.16.0) **Features:** + - Upgrade to wasmvm v0.14.0-rc1 [\#508](https://github.com/CosmWasm/wasmd/pull/508) ([alpe](https://github.com/alpe)) - Use the cache metrics from WasmVM [\#500](https://github.com/CosmWasm/wasmd/issues/500) - Update IBC.md [\#494](https://github.com/CosmWasm/wasmd/pull/494) ([ethanfrey](https://github.com/ethanfrey)) @@ -373,6 +358,7 @@ Yes - Implement IBC contract support [\#394](https://github.com/CosmWasm/wasmd/pull/394) ([alpe](https://github.com/alpe)) **Api breaking:** + - Improve list contracts by code query [\#497](https://github.com/CosmWasm/wasmd/pull/497) ([alpe](https://github.com/alpe)) - Rename to just `funds` [/#423](https://github.com/CosmWasm/wasmd/issues/423) @@ -398,6 +384,7 @@ Yes [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.14.1...v0.15.0) **Features:** + - Upgrade to cosmos-sdk v0.41.0 [\#390](https://github.com/CosmWasm/wasmd/pull/390) ## [v0.14.1](https://github.com/CosmWasm/wasmd/tree/v0.14.1) (2021-01-20) @@ -405,6 +392,7 @@ Yes [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.14.0...v0.14.1) **Features:** + - Upgrade to cosmos-sdk v0.40.1 final + Tendermint 0.34.3 [\#380](https://github.com/CosmWasm/wasmd/pull/380) ## [v0.14.0](https://github.com/CosmWasm/wasmd/tree/v0.14.0) (2021-01-11) @@ -412,6 +400,7 @@ Yes [Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.13.0...v0.14.0) **Features:** + - Upgrade to cosmos-sdk v0.40.0 final [\#354](https://github.com/CosmWasm/wasmd/pull/369) - Refactor to GRPC message server [\#366](https://github.com/CosmWasm/wasmd/pull/366) - Make it easy to initialize contracts in genesis file with new CLI commands[\#326](https://github.com/CosmWasm/wasmd/issues/326) diff --git a/app/ante.go b/app/ante.go index e5dd75a938..6c8069cc33 100644 --- a/app/ante.go +++ b/app/ante.go @@ -1,11 +1,12 @@ package app import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" - ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante" - "github.com/cosmos/ibc-go/v4/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante" + "github.com/cosmos/ibc-go/v6/modules/core/keeper" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types" @@ -18,7 +19,7 @@ type HandlerOptions struct { IBCKeeper *keeper.Keeper WasmConfig *wasmTypes.WasmConfig - TXCounterStoreKey sdk.StoreKey + TXCounterStoreKey storetypes.StoreKey } func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { @@ -47,20 +48,19 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit), // after setup context to enforce limits early wasmkeeper.NewCountTXDecorator(options.TXCounterStoreKey), - ante.NewRejectExtensionOptionsDecorator(), - ante.NewMempoolFeeDecorator(), + ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), ante.NewValidateBasicDecorator(), ante.NewTxTimeoutHeightDecorator(), ante.NewValidateMemoDecorator(options.AccountKeeper), ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper), + ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewSetPubKeyDecorator(options.AccountKeeper), ante.NewValidateSigCountDecorator(options.AccountKeeper), ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer), ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), ante.NewIncrementSequenceDecorator(options.AccountKeeper), - ibcante.NewAnteDecorator(options.IBCKeeper), + ibcante.NewRedundantRelayDecorator(options.IBCKeeper), } return sdk.ChainAnteDecorators(anteDecorators...), nil diff --git a/app/app.go b/app/app.go index 55d8f7ccec..33686c0f92 100644 --- a/app/app.go +++ b/app/app.go @@ -11,7 +11,6 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" - "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server/api" @@ -22,7 +21,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" - authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" @@ -56,6 +54,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/mint" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" @@ -74,30 +74,32 @@ import ( upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" - icacontroller "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/controller" - icacontrollerkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" - ibcfee "github.com/cosmos/ibc-go/v4/modules/apps/29-fee" - ibcfeekeeper "github.com/cosmos/ibc-go/v4/modules/apps/29-fee/keeper" - ibcfeetypes "github.com/cosmos/ibc-go/v4/modules/apps/29-fee/types" - transfer "github.com/cosmos/ibc-go/v4/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v4/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v4/modules/core" - ibcclient "github.com/cosmos/ibc-go/v4/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v4/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" + ica "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts" + icacontroller "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller" + icacontrollerkeeper "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types" + icahost "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" + ibcfee "github.com/cosmos/ibc-go/v6/modules/apps/29-fee" + ibcfeekeeper "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/keeper" + ibcfeetypes "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types" + transfer "github.com/cosmos/ibc-go/v6/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v6/modules/core" + ibcclient "github.com/cosmos/ibc-go/v6/modules/core/02-client" + ibcclientclient "github.com/cosmos/ibc-go/v6/modules/core/02-client/client" + ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" + ibchost "github.com/cosmos/ibc-go/v6/modules/core/24-host" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper" + ibcmock "github.com/cosmos/ibc-go/v6/testing/mock" // Note: please do your research before using this in production app, this is a demo and not an officially // supported IBC team implementation. It has no known issues, but do your own research before using it. + storetypes "github.com/cosmos/cosmos-sdk/store/types" intertx "github.com/cosmos/interchain-accounts/x/inter-tx" intertxkeeper "github.com/cosmos/interchain-accounts/x/inter-tx/keeper" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" @@ -120,7 +122,10 @@ import ( _ "github.com/cosmos/cosmos-sdk/client/docs/statik" ) -const appName = "WasmApp" +const ( + appName = "WasmApp" + MockFeePort string = ibcmock.ModuleName + ibcfeetypes.ModuleName +) // We pull these out so we can set them with LDFLAGS in the Makefile var ( @@ -186,17 +191,15 @@ var ( staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, - gov.NewAppModuleBasic( - append( - wasmclient.ProposalHandlers, //nolint:staticcheck - paramsclient.ProposalHandler, - distrclient.ProposalHandler, - upgradeclient.ProposalHandler, - upgradeclient.CancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, - ibcclientclient.UpgradeProposalHandler, - )..., - ), + gov.NewAppModuleBasic(append( + wasmclient.ProposalHandlers, + paramsclient.ProposalHandler, + distrclient.ProposalHandler, + upgradeclient.LegacyProposalHandler, + upgradeclient.LegacyCancelProposalHandler, + ibcclientclient.UpdateClientProposalHandler, + ibcclientclient.UpgradeProposalHandler, + )), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, @@ -236,16 +239,16 @@ var ( // WasmApp extended ABCI application type WasmApp struct { *baseapp.BaseApp - legacyAmino *codec.LegacyAmino //nolint:staticcheck + legacyAmino *codec.LegacyAmino appCodec codec.Codec interfaceRegistry types.InterfaceRegistry invCheckPeriod uint // keys to access the substores - keys map[string]*sdk.KVStoreKey - tkeys map[string]*sdk.TransientStoreKey - memKeys map[string]*sdk.MemoryStoreKey + keys map[string]*storetypes.KVStoreKey + tkeys map[string]*storetypes.TransientStoreKey + memKeys map[string]*storetypes.MemoryStoreKey // keepers AccountKeeper authkeeper.AccountKeeper @@ -340,7 +343,7 @@ func NewWasmApp( ) // set the BaseApp's parameter store - bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramskeeper.ConsensusParamsKeyTable())) + bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable())) // add capability keeper and ScopeToModule for ibc module app.CapabilityKeeper = capabilitykeeper.NewKeeper( @@ -360,21 +363,23 @@ func NewWasmApp( app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, keys[authtypes.StoreKey], - app.getSubspace(authtypes.ModuleName), + app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, + sdk.GetConfig().GetBech32AccountAddrPrefix(), ) app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, keys[banktypes.StoreKey], app.AccountKeeper, - app.getSubspace(banktypes.ModuleName), + app.GetSubspace(banktypes.ModuleName), app.ModuleAccountAddrs(), ) app.AuthzKeeper = authzkeeper.NewKeeper( keys[authzkeeper.StoreKey], appCodec, app.BaseApp.MsgServiceRouter(), + app.AccountKeeper, ) app.FeeGrantKeeper = feegrantkeeper.NewKeeper( appCodec, @@ -386,12 +391,12 @@ func NewWasmApp( keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - app.getSubspace(stakingtypes.ModuleName), + app.GetSubspace(stakingtypes.ModuleName), ) app.MintKeeper = mintkeeper.NewKeeper( appCodec, keys[minttypes.StoreKey], - app.getSubspace(minttypes.ModuleName), + app.GetSubspace(minttypes.ModuleName), &stakingKeeper, app.AccountKeeper, app.BankKeeper, @@ -400,21 +405,20 @@ func NewWasmApp( app.DistrKeeper = distrkeeper.NewKeeper( appCodec, keys[distrtypes.StoreKey], - app.getSubspace(distrtypes.ModuleName), + app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper, &stakingKeeper, authtypes.FeeCollectorName, - app.ModuleAccountAddrs(), ) app.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, keys[slashingtypes.StoreKey], &stakingKeeper, - app.getSubspace(slashingtypes.ModuleName), + app.GetSubspace(slashingtypes.ModuleName), ) app.CrisisKeeper = crisiskeeper.NewKeeper( - app.getSubspace(crisistypes.ModuleName), + app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, @@ -425,6 +429,7 @@ func NewWasmApp( appCodec, homePath, app.BaseApp, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // register the staking hooks @@ -436,16 +441,18 @@ func NewWasmApp( app.IBCKeeper = ibckeeper.NewKeeper( appCodec, keys[ibchost.StoreKey], - app.getSubspace(ibchost.ModuleName), + app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, ) - // register the proposal types - govRouter := govtypes.NewRouter() - govRouter. - AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). + // 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)). AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). @@ -453,7 +460,7 @@ func NewWasmApp( // IBC Fee Module keeper app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( - appCodec, keys[ibcfeetypes.StoreKey], app.getSubspace(ibcfeetypes.ModuleName), + appCodec, keys[ibcfeetypes.StoreKey], app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, @@ -463,7 +470,7 @@ func NewWasmApp( app.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, keys[ibctransfertypes.StoreKey], - app.getSubspace(ibctransfertypes.ModuleName), + app.GetSubspace(ibctransfertypes.ModuleName), app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, @@ -472,20 +479,26 @@ func NewWasmApp( scopedTransferKeeper, ) - app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, - keys[icahosttypes.StoreKey], - app.getSubspace(icahosttypes.SubModuleName), + // IBC Fee Module keeper + app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( + appCodec, keys[ibcfeetypes.StoreKey], + app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - app.AccountKeeper, - scopedICAHostKeeper, - app.MsgServiceRouter(), + &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, + ) + + // ICA Host keeper + app.ICAHostKeeper = icahostkeeper.NewKeeper( + appCodec, keys[icahosttypes.StoreKey], app.GetSubspace(icahosttypes.SubModuleName), + app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack + app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, + app.AccountKeeper, scopedICAHostKeeper, app.MsgServiceRouter(), ) + app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper( appCodec, keys[icacontrollertypes.StoreKey], - app.getSubspace(icacontrollertypes.SubModuleName), + app.GetSubspace(icacontrollertypes.SubModuleName), app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, @@ -518,7 +531,7 @@ func NewWasmApp( app.WasmKeeper = wasm.NewKeeper( appCodec, keys[wasm.StoreKey], - app.getSubspace(wasm.ModuleName), + app.GetSubspace(wasm.ModuleName), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, @@ -577,14 +590,27 @@ func NewWasmApp( AddRoute(icahosttypes.SubModuleName, icaHostStack) app.IBCKeeper.SetRouter(ibcRouter) - app.GovKeeper = govkeeper.NewKeeper( + govConfig := govtypes.DefaultConfig() + /* + Example of setting gov params: + govConfig.MaxMetadataLen = 10000 + */ + govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], - app.getSubspace(govtypes.ModuleName), + app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, &stakingKeeper, govRouter, + app.MsgServiceRouter(), + govConfig, + ) + + app.GovKeeper = *govKeeper.SetHooks( + govtypes.NewMultiGovHooks( + // register the governance hooks + ), ) /**** Module Options ****/ @@ -606,7 +632,7 @@ func NewWasmApp( bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), @@ -734,7 +760,7 @@ func NewWasmApp( feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), + 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), @@ -777,6 +803,7 @@ func NewWasmApp( // must be before Loading version // requires the snapshot store to be created and registered as a BaseAppOption // see cmd/wasmd/root.go: 206 - 214 approx + if manager := app.SnapshotManager(); manager != nil { err := manager.RegisterExtensions( wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.WasmKeeper), @@ -862,14 +889,14 @@ func (app *WasmApp) ModuleAccountAddrs() map[string]bool { // // NOTE: This is solely to be used for testing purposes as it may be desirable // for modules to register their own custom testing types. -func (app *WasmApp) LegacyAmino() *codec.LegacyAmino { //nolint:staticcheck +func (app *WasmApp) LegacyAmino() *codec.LegacyAmino { return app.legacyAmino } -// getSubspace returns a param subspace for a given module name. +// GetSubspace returns a param subspace for a given module name. // // NOTE: This is solely to be used for testing purposes. -func (app *WasmApp) getSubspace(moduleName string) paramstypes.Subspace { +func (app *WasmApp) GetSubspace(moduleName string) paramstypes.Subspace { subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) return subspace } @@ -883,16 +910,11 @@ func (app *WasmApp) SimulationManager() *module.SimulationManager { // API server. func (app *WasmApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { clientCtx := apiSvr.ClientCtx - rpc.RegisterRoutes(clientCtx, apiSvr.Router) - // Register legacy tx routes. - authrest.RegisterTxRoutes(clientCtx, apiSvr.Router) // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // 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) ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // register swagger API from root so that other applications can override easily @@ -908,7 +930,12 @@ func (app *WasmApp) RegisterTxService(clientCtx client.Context) { // RegisterTendermintService implements the Application.RegisterTendermintService method. func (app *WasmApp) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry) + tmservice.RegisterTendermintService( + clientCtx, + app.BaseApp.GRPCQueryRouter(), + app.interfaceRegistry, + app.Query, + ) } func (app *WasmApp) AppCodec() codec.Codec { @@ -936,7 +963,7 @@ func GetMaccPerms() map[string][]string { } // initParamsKeeper init params keeper and its subspaces -func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper { +func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) paramsKeeper.Subspace(authtypes.ModuleName) @@ -945,7 +972,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(minttypes.ModuleName) paramsKeeper.Subspace(distrtypes.ModuleName) paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()) + paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) paramsKeeper.Subspace(ibctransfertypes.ModuleName) paramsKeeper.Subspace(ibchost.ModuleName) diff --git a/app/app_test.go b/app/app_test.go index 9a5ec80f88..c0f441c6c9 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -4,10 +4,20 @@ import ( "encoding/json" "os" "testing" - + "time" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/cosmos/ibc-go/v6/testing/mock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" + tmtypes "github.com/tendermint/tendermint/types" db "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" @@ -15,13 +25,32 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" ) -var emptyWasmOpts []wasm.Option = nil +var emptyWasmOpts []wasm.Option func TestWasmdExport(t *testing.T) { db := db.NewMemDB() gapp := NewWasmApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), wasm.EnableAllProposals, EmptyBaseAppOptions{}, emptyWasmOpts) + // generate validator private/public key + privVal := mock.NewPV() + pubKey, err := privVal.GetPubKey() + require.NoError(t, err) - genesisState := NewDefaultGenesisState() + // create validator set with single validator + validator := tmtypes.NewValidator(pubKey, 1) + valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) + + // generate genesis account + senderPrivKey := secp256k1.GenPrivKey() + acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) + amount, ok := sdk.NewIntFromString("10000000000000000000") + require.True(t, ok) + + balance := banktypes.Balance{ + Address: acc.GetAddress().String(), + Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, amount)), + } + + genesisState := SetupGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, nil, gapp, balance) stateBytes, err := json.MarshalIndent(genesisState, "", " ") require.NoError(t, err) @@ -90,21 +119,59 @@ func TestGetEnabledProposals(t *testing.T) { } } -func setGenesis(gapp *WasmApp) error { +func SetupGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, opts []wasm.Option, app *WasmApp, balances ...banktypes.Balance) GenesisState { genesisState := NewDefaultGenesisState() - stateBytes, err := json.MarshalIndent(genesisState, "", " ") - if err != nil { - return err + // set genesis accounts + authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) + genesisState[authtypes.ModuleName] = app.appCodec.MustMarshalJSON(authGenesis) + + validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) + delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) + + bondAmt := sdk.NewInt(1000000) + + for _, val := range valSet.Validators { + pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) + require.NoError(t, err) + pkAny, err := codectypes.NewAnyWithValue(pk) + require.NoError(t, err) + validator := stakingtypes.Validator{ + OperatorAddress: sdk.ValAddress(val.Address).String(), + ConsensusPubkey: pkAny, + Jailed: false, + Status: stakingtypes.Bonded, + Tokens: bondAmt, + DelegatorShares: sdk.OneDec(), + Description: stakingtypes.Description{}, + UnbondingHeight: int64(0), + UnbondingTime: time.Unix(0, 0).UTC(), + Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + MinSelfDelegation: sdk.ZeroInt(), + } + validators = append(validators, validator) + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) + } - // Initialize the chain - gapp.InitChain( - abci.RequestInitChain{ - Validators: []abci.ValidatorUpdate{}, - AppStateBytes: stateBytes, - }, - ) + // set validators and delegations + stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) + genesisState[stakingtypes.ModuleName] = app.appCodec.MustMarshalJSON(stakingGenesis) - gapp.Commit() - return nil + totalSupply := sdk.NewCoins() + for _, b := range balances { + // add genesis acc tokens and delegated tokens to total supply + totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(sdk.DefaultBondDenom, bondAmt))...) + } + + // add bonded amount to bonded pool module account + balances = append(balances, banktypes.Balance{ + Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), + Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)}, + }) + + // update total supply + bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}) + genesisState[banktypes.ModuleName] = app.appCodec.MustMarshalJSON(bankGenesis) + + return genesisState } diff --git a/app/export.go b/app/export.go index c494a9b6da..1512252a29 100644 --- a/app/export.go +++ b/app/export.go @@ -73,7 +73,7 @@ func (app *WasmApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ // withdraw all validator commission app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) //nolint:errcheck + _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) return false }) @@ -89,7 +89,7 @@ func (app *WasmApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ if err != nil { panic(err) } - _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) //nolint:errcheck + _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) } // clear validator slash events @@ -110,7 +110,10 @@ func (app *WasmApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) app.DistrKeeper.SetFeePool(ctx, feePool) - app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) + err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) + if err != nil { + panic(err) + } return false }) @@ -124,8 +127,14 @@ func (app *WasmApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ if err != nil { panic(err) } - app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) - app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) + err = app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) + if err != nil { + panic(err) + } + err = app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) + if err != nil { + panic(err) + } } // reset context height diff --git a/app/sim_test.go b/app/sim_test.go index 5e206064e6..08c686cde4 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "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/kv" "github.com/cosmos/cosmos-sdk/types/module" @@ -28,8 +29,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibchost "github.com/cosmos/ibc-go/v6/modules/core/24-host" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -45,8 +46,8 @@ func init() { } type StoreKeysPrefixes struct { - A sdk.StoreKey - B sdk.StoreKey + A storetypes.StoreKey + B storetypes.StoreKey Prefixes [][]byte } diff --git a/app/test_access.go b/app/test_access.go index 51b8bb9939..b4efb96823 100644 --- a/app/test_access.go +++ b/app/test_access.go @@ -12,8 +12,8 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - ibctransferkeeper "github.com/cosmos/ibc-go/v4/modules/apps/transfer/keeper" - ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" + ibctransferkeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper" "github.com/CosmWasm/wasmd/x/wasm" ) diff --git a/app/test_helpers.go b/app/test_helpers.go index c48425f6ba..b4b30a533c 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -5,19 +5,23 @@ import ( "encoding/hex" "encoding/json" "fmt" + "math/rand" "path/filepath" "strconv" "testing" "time" + "cosmossdk.io/math" bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp/helpers" "github.com/cosmos/cosmos-sdk/snapshots" + snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -25,6 +29,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/cosmos/ibc-go/v6/testing/mock" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" @@ -32,6 +37,7 @@ import ( tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" + errorsmod "cosmossdk.io/errors" "github.com/CosmWasm/wasmd/x/wasm" ) @@ -57,12 +63,14 @@ var DefaultConsensusParams = &abci.ConsensusParams{ func setup(t testing.TB, withGenesis bool, invCheckPeriod uint, opts ...wasm.Option) (*WasmApp, GenesisState) { nodeHome := t.TempDir() snapshotDir := filepath.Join(nodeHome, "data", "snapshots") - snapshotDB, err := sdk.NewLevelDB("metadata", snapshotDir) + snapshotDB, err := sdk.NewLevelDB("metadata", snapshotDir) //nolint:staticcheck require.NoError(t, err) t.Cleanup(func() { snapshotDB.Close() }) snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) require.NoError(t, err) - baseAppOpts := []func(*bam.BaseApp){bam.SetSnapshotStore(snapshotStore), bam.SetSnapshotKeepRecent(2)} + baseAppOpts := []func(*bam.BaseApp){ + bam.SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 2)), + } db := dbm.NewMemDB() t.Cleanup(func() { db.Close() }) app := NewWasmApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, nodeHome, invCheckPeriod, MakeEncodingConfig(), wasm.EnableAllProposals, EmptyBaseAppOptions{}, opts, baseAppOpts...) @@ -95,6 +103,31 @@ func Setup(isCheckTx bool, opts ...wasm.Option) *WasmApp { return app } +func SetupWasmAppWithValSet(t *testing.T) *WasmApp { + // generate validator private/public key + privVal := mock.NewPV() + pubKey, err := privVal.GetPubKey() + require.NoError(t, err) + + // create validator set with single validator + validator := tmtypes.NewValidator(pubKey, 1) + valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) + + // generate genesis account + senderPrivKey := secp256k1.GenPrivKey() + acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) + amount, ok := sdk.NewIntFromString("10000000000000000000") + require.True(t, ok) + + balance := banktypes.Balance{ + Address: acc.GetAddress().String(), + Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, amount)), + } + + wasmApp := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, "notional", nil, balance) + return wasmApp +} + // SetupWithGenesisValSet initializes a new WasmApp with a validator set and genesis accounts // that also act as delegators. For simplicity, each validator is bonded with a delegation // of one consensus engine unit (10^6) in the default token of the WasmApp from first genesis @@ -213,7 +246,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, err := sdk.AccAddressFromHex(buffer.String()) + res, err := sdk.AccAddressFromHexUnsafe(buffer.String()) if err != nil { panic(err) } @@ -231,7 +264,7 @@ func createIncrementalAccounts(accNum int) []sdk.AccAddress { } // AddTestAddrsFromPubKeys adds the addresses into the WasmApp providing only the public keys. -func AddTestAddrsFromPubKeys(app *WasmApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt sdk.Int) { +func AddTestAddrsFromPubKeys(app *WasmApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt math.Int) { initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) for _, pk := range pubKeys { @@ -241,17 +274,17 @@ func AddTestAddrsFromPubKeys(app *WasmApp, ctx sdk.Context, pubKeys []cryptotype // AddTestAddrs constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order -func AddTestAddrs(app *WasmApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress { +func AddTestAddrs(app *WasmApp, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createRandomAccounts) } // AddTestAddrs constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order -func AddTestAddrsIncremental(app *WasmApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress { +func AddTestAddrsIncremental(app *WasmApp, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createIncrementalAccounts) } -func addTestAddrs(app *WasmApp, ctx sdk.Context, accNum int, accAmt sdk.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { +func addTestAddrs(app *WasmApp, ctx sdk.Context, accNum int, accAmt math.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { testAddrs := strategy(accNum) initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) @@ -288,7 +321,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 } @@ -324,7 +357,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)}, @@ -351,7 +385,7 @@ func SignCheckDeliver( // Simulate a sending a transaction and committing a block app.BeginBlock(abci.RequestBeginBlock{Header: header}) - gInfo, res, err := app.Deliver(txCfg.TxEncoder(), tx) + gInfo, res, err := app.SimDeliver(txCfg.TxEncoder(), tx) if expPass { require.NoError(t, err) @@ -373,7 +407,8 @@ func SignAndDeliver( t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header tmproto.Header, msgs []sdk.Msg, chainID string, accNums, accSeqs []uint64, 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)}, @@ -387,7 +422,7 @@ func SignAndDeliver( // Simulate a sending a transaction and committing a block app.BeginBlock(abci.RequestBeginBlock{Header: header}) - gInfo, res, err := app.Deliver(txCfg.TxEncoder(), tx) + gInfo, res, err := app.SimDeliver(txCfg.TxEncoder(), tx) return gInfo, res, err } @@ -398,7 +433,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)}, @@ -447,7 +483,7 @@ func NewPubKeyFromHex(pk string) (res cryptotypes.PubKey) { panic(err) } if len(pkBytes) != ed25519.PubKeySize { - panic(errors.Wrap(errors.ErrInvalidPubKey, "invalid pubkey size")) + panic(errorsmod.Wrap(errors.ErrInvalidPubKey, "invalid pubkey size")) } return &ed25519.PubKey{Key: pkBytes} } diff --git a/benchmarks/app_test.go b/benchmarks/app_test.go index 88773e6b42..24aef1f3aa 100644 --- a/benchmarks/app_test.go +++ b/benchmarks/app_test.go @@ -2,6 +2,7 @@ package benchmarks import ( "encoding/json" + "math/rand" "os" "testing" "time" @@ -11,12 +12,13 @@ import ( 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" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/simapp/helpers" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + "github.com/cosmos/cosmos-sdk/testutil/mock" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -24,6 +26,12 @@ import ( "github.com/CosmWasm/wasmd/app" "github.com/CosmWasm/wasmd/x/wasm" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" ) func setup(db dbm.DB, withGenesis bool, invCheckPeriod uint, opts ...wasm.Option) (*app.WasmApp, app.GenesisState) { @@ -37,18 +45,61 @@ func setup(db dbm.DB, withGenesis bool, invCheckPeriod uint, opts ...wasm.Option // SetupWithGenesisAccounts initializes a new WasmApp with the provided genesis // accounts and possible balances. -func SetupWithGenesisAccounts(b testing.TB, db dbm.DB, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *app.WasmApp { +func SetupWithGenesisAccountsAndValSet(b testing.TB, db dbm.DB, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *app.WasmApp { wasmApp, genesisState := setup(db, true, 0) authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) appCodec := app.NewTestSupport(b, wasmApp).AppCodec() + privVal := mock.NewPV() + pubKey, err := privVal.GetPubKey() + require.NoError(b, err) + genesisState[authtypes.ModuleName] = appCodec.MustMarshalJSON(authGenesis) + validator := tmtypes.NewValidator(pubKey, 1) + valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) + + validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) + delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) + + bondAmt := sdk.DefaultPowerReduction + + for _, val := range valSet.Validators { + pk, _ := cryptocodec.FromTmPubKeyInterface(val.PubKey) + pkAny, _ := codectypes.NewAnyWithValue(pk) + validator := stakingtypes.Validator{ + OperatorAddress: sdk.ValAddress(val.Address).String(), + ConsensusPubkey: pkAny, + Jailed: false, + Status: stakingtypes.Bonded, + Tokens: bondAmt, + DelegatorShares: sdk.OneDec(), + Description: stakingtypes.Description{}, + UnbondingHeight: int64(0), + UnbondingTime: time.Unix(0, 0).UTC(), + Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + MinSelfDelegation: sdk.ZeroInt(), + } + validators = append(validators, validator) + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) + + } + // set validators and delegations + stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) + genesisState[stakingtypes.ModuleName] = appCodec.MustMarshalJSON(stakingGenesis) + totalSupply := sdk.NewCoins() + + // add bonded amount to bonded pool module account + balances = append(balances, banktypes.Balance{ + Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), + Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)}, + }) + // update total supply for _, b := range balances { + // add genesis acc tokens and delegated tokens to total supply totalSupply = totalSupply.Add(b.Coins...) } - bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}) genesisState[banktypes.ModuleName] = appCodec.MustMarshalJSON(bankGenesis) @@ -111,7 +162,7 @@ func InitializeWasmApp(b testing.TB, db dbm.DB, numAccounts int) AppInfo { Coins: sdk.NewCoins(sdk.NewInt64Coin(denom, 100000000000)), } } - wasmApp := SetupWithGenesisAccounts(b, db, genAccs, bals...) + wasmApp := SetupWithGenesisAccountsAndValSet(b, db, genAccs, bals...) // add wasm contract height := int64(2) @@ -125,9 +176,10 @@ func InitializeWasmApp(b testing.TB, db dbm.DB, numAccounts int) AppInfo { Sender: addr.String(), WASMByteCode: cw20Code, } - storeTx, err := helpers.GenTx(txGen, []sdk.Msg{&storeMsg}, nil, 55123123, "", []uint64{0}, []uint64{0}, minter) + storeTx, err := helpers.GenSignedMockTx(rand.New(rand.NewSource(time.Now().UnixNano())), + txGen, []sdk.Msg{&storeMsg}, nil, 55123123, "", []uint64{0}, []uint64{0}, minter) require.NoError(b, err) - _, res, err := wasmApp.Deliver(txGen.TxEncoder(), storeTx) + _, _, err = wasmApp.SimDeliver(txGen.TxEncoder(), storeTx) require.NoError(b, err) codeID := uint64(1) @@ -159,9 +211,16 @@ func InitializeWasmApp(b testing.TB, db dbm.DB, numAccounts int) AppInfo { Msg: initBz, } gasWanted := 500000 + 10000*uint64(numAccounts) - initTx, err := helpers.GenTx(txGen, []sdk.Msg{&initMsg}, nil, gasWanted, "", []uint64{0}, []uint64{1}, minter) + initTx, err := helpers.GenSignedMockTx(rand.New(rand.NewSource(time.Now().UnixNano())), + txGen, + []sdk.Msg{&initMsg}, + nil, gasWanted, + "", + []uint64{0}, + []uint64{1}, + minter) require.NoError(b, err) - _, res, err = wasmApp.Deliver(txGen.TxEncoder(), initTx) + _, res, err := wasmApp.SimDeliver(txGen.TxEncoder(), initTx) require.NoError(b, err) // TODO: parse contract address better @@ -191,7 +250,8 @@ func GenSequenceOfTxs(b testing.TB, info *AppInfo, msgGen func(*AppInfo) ([]sdk. for i := 0; i < numToGenerate; i++ { msgs, err := msgGen(info) require.NoError(b, err) - txs[i], err = helpers.GenTx( + txs[i], err = helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), info.TxConfig, msgs, fees, @@ -202,7 +262,7 @@ func GenSequenceOfTxs(b testing.TB, info *AppInfo, msgGen func(*AppInfo) ([]sdk. info.MinterKey, ) require.NoError(b, err) - info.SeqNum += 1 + info.SeqNum++ } return txs diff --git a/benchmarks/bench_test.go b/benchmarks/bench_test.go index 9001f1abf4..0cd181f5d1 100644 --- a/benchmarks/bench_test.go +++ b/benchmarks/bench_test.go @@ -108,11 +108,11 @@ func BenchmarkTxSending(b *testing.B) { for j := 0; j < blockSize; j++ { idx := i*blockSize + j - _, _, err := appInfo.App.Check(txEncoder, txs[idx]) + _, _, err := appInfo.App.SimCheck(txEncoder, txs[idx]) if err != nil { panic("something is broken in checking transaction") } - _, _, err = appInfo.App.Deliver(txEncoder, txs[idx]) + _, _, err = appInfo.App.SimDeliver(txEncoder, txs[idx]) require.NoError(b, err) } diff --git a/cmd/wasmd/genaccounts.go b/cmd/wasmd/genaccounts.go index 9acf2cea70..448e5fdbb3 100644 --- a/cmd/wasmd/genaccounts.go +++ b/cmd/wasmd/genaccounts.go @@ -54,7 +54,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa } if keyringBackend != "" && clientCtx.Keyring == nil { var err error - kr, err = keyring.New(sdk.KeyringServiceName(), keyringBackend, clientCtx.HomeDir, inBuf) + kr, err = keyring.New(sdk.KeyringServiceName(), keyringBackend, clientCtx.HomeDir, inBuf, clientCtx.Codec) if err != nil { return err } @@ -66,7 +66,10 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa if err != nil { return fmt.Errorf("failed to get address from Keyring: %w", err) } - addr = info.GetAddress() + addr, err = info.GetAddress() + if err != nil { + return fmt.Errorf("failed to get address from Keyring: %w", err) + } } coins, err := sdk.ParseCoinsNormalized(args[1]) diff --git a/cmd/wasmd/main.go b/cmd/wasmd/main.go index 7bd3d01220..3a7719e6cf 100644 --- a/cmd/wasmd/main.go +++ b/cmd/wasmd/main.go @@ -12,7 +12,7 @@ import ( func main() { rootCmd, _ := NewRootCmd() - if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil { + if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { switch e := err.(type) { case server.ErrorCode: os.Exit(e.Code) diff --git a/cmd/wasmd/root.go b/cmd/wasmd/root.go index eeaf39aad5..6ef6d230bb 100644 --- a/cmd/wasmd/root.go +++ b/cmd/wasmd/root.go @@ -16,6 +16,7 @@ import ( "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/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/version" @@ -27,6 +28,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/spf13/cast" "github.com/spf13/cobra" + tmcfg "github.com/tendermint/tendermint/config" tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" @@ -83,7 +85,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { return err } - return server.InterceptConfigsPreRunHandler(cmd, "", nil) + return server.InterceptConfigsPreRunHandler(cmd, "", nil, tmcfg.DefaultConfig()) }, } @@ -202,7 +204,7 @@ func (ac appCreator) newApp( } snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots") - snapshotDB, err := sdk.NewLevelDB("metadata", snapshotDir) + snapshotDB, err := sdk.NewLevelDB("metadata", snapshotDir) //nolint:staticcheck if err != nil { panic(err) } @@ -215,6 +217,11 @@ func (ac appCreator) newApp( wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer)) } + snapshotOptions := snapshottypes.NewSnapshotOptions( + cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)), + cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)), + ) + return app.NewWasmApp(logger, db, traceStore, true, skipUpgradeHeights, cast.ToString(appOpts.Get(flags.FlagHome)), cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), @@ -230,9 +237,7 @@ func (ac appCreator) newApp( 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), ) } diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile index 611f0c4d87..1f2c3a546d 100644 --- a/contrib/devtools/Makefile +++ b/contrib/devtools/Makefile @@ -76,7 +76,7 @@ $(RUNSIM): golangci-lint: $(GOLANGCI_LINT) $(GOLANGCI_LINT): @echo "Installing golangci-lint..." - @(cd /tmp && go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.0) + @(cd /tmp && go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47) tools-clean: rm -f $(STATIK) $(GOLANGCI_LINT) $(RUNSIM) diff --git a/go.mod b/go.mod index 2d43bd2ac3..b617e2f36b 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,15 @@ module github.com/CosmWasm/wasmd go 1.19 require ( + cosmossdk.io/errors v1.0.0-beta.7 + cosmossdk.io/math v1.0.0-beta.6 github.com/CosmWasm/wasmvm v1.2.1 github.com/cosmos/cosmos-proto v1.0.0-beta.2 - github.com/cosmos/cosmos-sdk v0.45.14 - github.com/cosmos/gogoproto v1.4.6 + github.com/cosmos/cosmos-sdk v0.46.11 + github.com/cosmos/gogoproto v1.4.4 github.com/cosmos/iavl v0.19.5 - github.com/cosmos/ibc-go/v4 v4.3.0 - github.com/cosmos/interchain-accounts v0.2.6 + github.com/cosmos/ibc-go/v6 v6.1.0 + github.com/cosmos/interchain-accounts v0.4.3 github.com/docker/distribution v2.8.1+incompatible github.com/dvsekhvalnov/jose2go v1.5.0 github.com/gogo/protobuf v1.3.3 @@ -24,41 +26,41 @@ require ( github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.1 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - github.com/tendermint/tendermint v0.34.26 + github.com/tendermint/tendermint v0.34.27 github.com/tendermint/tm-db v0.6.7 - google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa - google.golang.org/grpc v1.53.0 + google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 + google.golang.org/grpc v1.52.3 gopkg.in/yaml.v2 v2.4.0 ) require ( - cosmossdk.io/api v0.2.6 // indirect - cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - filippo.io/edwards25519 v1.0.0-beta.2 // indirect + cloud.google.com/go v0.105.0 // indirect + cloud.google.com/go/compute v1.12.1 // indirect + cloud.google.com/go/compute/metadata v0.2.1 // indirect + cloud.google.com/go/iam v0.7.0 // indirect + cloud.google.com/go/storage v1.27.0 // indirect + filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/DataDog/zstd v1.4.5 // indirect - github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect - github.com/armon/go-metrics v0.4.0 // indirect + github.com/armon/go-metrics v0.4.1 // indirect + github.com/aws/aws-sdk-go v1.44.122 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd v0.22.2 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // 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/cockroachdb/errors v1.9.1 // indirect - github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677 // indirect - github.com/cockroachdb/redact v1.1.3 // indirect - github.com/coinbase/rosetta-sdk-go v0.7.0 // indirect + github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect + github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect + github.com/cometbft/cometbft-db v0.7.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect - github.com/cosmos/btcutil v1.0.4 // indirect - github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect @@ -73,42 +75,50 @@ require ( github.com/dustin/go-humanize v1.0.0 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.17.0 // 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/gogo/gateway v1.1.0 // 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.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/orderedcode v0.0.1 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect + github.com/googleapis/gax-go/v2 v2.6.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.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-getter v1.7.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/hashicorp/go-version v1.6.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/improbable-eng/grpc-web v0.14.1 // indirect + github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.15.11 // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.6 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.7.10 // indirect github.com/magiconair/properties v1.8.6 // indirect + github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // 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.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -121,7 +131,6 @@ require ( github.com/prometheus/procfs v0.8.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/rs/cors v1.8.2 // indirect github.com/rs/zerolog v1.27.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect @@ -129,35 +138,40 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/viper v1.14.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect + github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.5.0 // indirect + github.com/ulikunitz/xz v0.5.10 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.6 // indirect + go.opencensus.io v0.23.0 // indirect golang.org/x/crypto v0.5.0 // indirect - golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 // indirect - golang.org/x/net v0.6.0 // indirect + golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/oauth2 v0.1.0 // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.102.0 // indirect + google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) replace ( + // fix nil desitantion channel id err + github.com/cosmos/ibc-go/v6 => github.com/notional-labs/ibc-go/v6 v6.1.1-0.20230320072703-2bb93fc8c7a6 // 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/gin-gonic/gin => github.com/gin-gonic/gin v1.8.1 // latest grpc doesn't work with with our modified proto compiler, so we need to enforce // the following version across all dependencies. github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - - // use informal system fork of tendermint - // See https://twitter.com/informalinc/status/1613580954383040512 - github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26 - - google.golang.org/grpc => google.golang.org/grpc v1.33.2 + // use cometbft + github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27 ) diff --git a/go.sum b/go.sum index e7f3303f53..154f473402 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,14 @@ +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.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= 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= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -16,80 +19,213 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb 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.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 v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 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/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +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/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= 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/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.7.0 h1:k4MuwOsS7zGJJ+QfZ5vBK8SgHBAvYN/23BWsiihJ1vs= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= 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/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= 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= -cosmossdk.io/api v0.2.6 h1:AoNwaLLapcLsphhMK6+o0kZl+D6MMUaHVqSdwinASGU= -cosmossdk.io/api v0.2.6/go.mod h1:u/d+GAxil0nWpl1XnQL8nkziQDIWuBDhv8VnDm/s6dI= -cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= -cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +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.6 h1:WF29SiFYNde5eYvqO2kdOM9nYbDb44j3YW5B8M1m9KE= +cosmossdk.io/math v1.0.0-beta.6/go.mod h1:gUVtWwIzfSXqcOT+lBVz2jyjfua8DoBdzRsIyaUAT/8= 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= +git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= +git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -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/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/CosmWasm/wasmvm v1.2.1 h1:si0tRsRDdUShV0k51Wn6zRKlmj3/WWP9Yr4cLmDTf+8= github.com/CosmWasm/wasmvm v1.2.1/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= +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.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= +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.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= 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= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= 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/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= 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.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= @@ -98,52 +234,67 @@ github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1: github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= 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/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= 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/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= 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/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= -github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.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 v1.44.122 h1:p6mw01WBaNpbdP2xrisz5tIkcNwzj/HysobNoaAHjgo= +github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= 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= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= 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.2 h1:vBZ+lGGd1XubpOWO67ITJpAEsICWhA0YzqkcpkgNBfo= -github.com/btcsuite/btcd v0.22.2/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= +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/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +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-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= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= @@ -151,9 +302,14 @@ 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/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/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.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= @@ -161,38 +317,44 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf 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/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 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/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +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= +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/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= -github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677 h1:qbb/AE938DFhOajUYh9+OXELpSF9KZw2ZivtmW6eX1Q= -github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677/go.mod h1:890yq1fUb9b6dGNwssgeUO5vQV9qfXnCPxAJhBQfXw0= -github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -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/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= +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/cometbft/cometbft v0.34.27 h1:ri6BvmwjWR0gurYjywcBqRe4bbwc3QVs9KRcCzgh/J0= +github.com/cometbft/cometbft v0.34.27/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw= +github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= +github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= +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.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= 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= @@ -200,27 +362,23 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= 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-db v0.0.0-20221226095112-f3c38ecb5e32 h1:zlCp9n3uwQieELltZWHRmwPmPaZ8+XoL2Sj+A2YJlr8= -github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32/go.mod h1:kwMlEC4wWvB48zAShGKVqboJL6w4zCLesaNQ3YLU2BQ= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.45.14 h1:l6yid1Lft5dd8ymKO36qJf1phsE0shJLNkZQYTwjxOg= -github.com/cosmos/cosmos-sdk v0.45.14/go.mod h1:bF1fyVbRDvZ922GMByg9opQT26sQwabwYqaYIchwdyw= +github.com/cosmos/cosmos-sdk v0.46.11 h1:csMJQHtcb/EIu2EJmeg/2NaGkGw3ZScFwa4CRpCCw18= +github.com/cosmos/cosmos-sdk v0.46.11/go.mod h1:bG4AkW9bqc8ycrryyKGQEl3YV9BY2wr6HggGq8kvcgM= 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/gogoproto v1.4.6 h1:Ee7z15dWJaGlgM2rWrK8N2IX7PQcuccu8oG68jp5RL4= -github.com/cosmos/gogoproto v1.4.6/go.mod h1:VS/ASYmPgv6zkPKLjR9EB91lwbLHOzaGCirmKKhncfI= +github.com/cosmos/gogoproto v1.4.4 h1:nVAsgLlAf5jeN0fV7hRlkZvf768zU+dy4pG+hxc2P34= +github.com/cosmos/gogoproto v1.4.4/go.mod h1:/yl6/nLwsZcZ2JY3OrqjRqvqCG9InUMcXRfRjQiF9DU= 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.5 h1:rGA3hOrgNxgRM5wYcSCxgQBap7fW82WZgY78V9po/iY= github.com/cosmos/iavl v0.19.5/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v4 v4.3.0 h1:yOzVsyZzsv4XPBux8gq+D0LhZn45yGWKjvT+6Vyo5no= -github.com/cosmos/ibc-go/v4 v4.3.0/go.mod h1:CcLvIoi9NNtIbNsxs4KjBGjYhlwqtsmXy1AKARKiMzQ= -github.com/cosmos/interchain-accounts v0.2.6 h1:TV2M2g1/Rb9MCNw1YePdBKE0rcEczNj1RGHT+2iRYas= -github.com/cosmos/interchain-accounts v0.2.6/go.mod h1:lUzWNzCiCtIEYZefac5+YgEBz2aR39nMS374jIv1c7o= +github.com/cosmos/interchain-accounts v0.4.3 h1:WedxEa/Hj/2GY7AF6CafkEPJ/Z9rhl3rT1mRwNHsdts= +github.com/cosmos/interchain-accounts v0.4.3/go.mod h1:qibHB6y/R2YsuuZdamI2BcIUBPMyhyELDWAr8Nk8x4g= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= @@ -230,24 +388,24 @@ github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6V github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= 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/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= 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/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= 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 v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -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= @@ -255,45 +413,51 @@ github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70d 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-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= 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/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/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= 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.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= +github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= 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 v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -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/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +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= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +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.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.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/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= +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/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -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.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= 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/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 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 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -303,20 +467,17 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.17.0 h1:UustVWnOoDFHBS7IJUB2QK/nB5pap748ZEp0swnQJak= -github.com/getsentry/sentry-go v0.17.0/go.mod h1:B82dxtBvxG0KaPD8/hfSV+VcHD+Lg/xUS4JuQn1P4cM= -github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +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= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= -github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= 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= @@ -334,17 +495,19 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V 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-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= 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= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= 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/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh+BF8dHX5nt/dr0= +github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= 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/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= @@ -352,17 +515,18 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.9.7 h1:IcB+Aqpx/iMHu5Yooh7jEzJk1JZ7Pjtmys2ukPr7EeM= +github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= 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/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 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 v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +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= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -370,13 +534,18 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er 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 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= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 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.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= @@ -393,19 +562,19 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD 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.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= 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/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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -414,19 +583,25 @@ github.com/google/go-cmp v0.4.1/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.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 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/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/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= 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= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/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/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= @@ -439,12 +614,33 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf 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-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/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.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/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= 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/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= 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= @@ -455,12 +651,11 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z 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.0/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 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= 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= @@ -480,8 +675,13 @@ github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIv 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= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= 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.7.0 h1:bzrYP+qu/gMrL1au7/aDvkoOVGUJpeKBgbqRHACAFDY= +github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= 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= @@ -489,57 +689,64 @@ github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iP github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= 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-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= 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 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= 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-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= -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/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/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +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.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= +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/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= 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/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -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/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= +github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/informalsystems/tendermint v0.34.26 h1:89XvVexAy62geGWxmDmdmmJvfindx+Su2oTuwfSWMeU= -github.com/informalsystems/tendermint v0.34.26/go.mod h1:q3uAZ/t5+MblQhFuHSd4flqaLDx7iUtWpwWbwvHAFhs= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= +github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= +github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= +github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= +github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= 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.13.1-0.20220928232736-101791cb1b4c h1:XImQJfpJLmGEEd8ll5yPVyL/aEvmgGHW4WYTyNseLOM= +github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= 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/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -555,81 +762,70 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr 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/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= -github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 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/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/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= +github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= 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/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +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= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/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/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= 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/linxGnu/grocksdb v1.7.10 h1:dz7RY7GnFUA+GJO6jodyxgkUeGMEkPp3ikt9hAcNGEw= -github.com/linxGnu/grocksdb v1.7.10/go.mod h1:0hTf+iA+GOr0jDX4CgIYyJZxqOH9XlBh6KVj8+zmF34= 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/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= 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.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +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.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +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-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -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-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.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -639,14 +835,12 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ 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/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= -github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= @@ -655,15 +849,20 @@ github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA github.com/minio/highwayhash v1.0.2/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/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-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= 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/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= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -671,7 +870,8 @@ 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/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +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= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -683,27 +883,24 @@ github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo 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.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= 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/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/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/notional-labs/ibc-go/v6 v6.1.1-0.20230320072703-2bb93fc8c7a6 h1:xNl8FXgYrmHV8IWoudATQYy/s37DNJGDo+qs3CNTGaA= +github.com/notional-labs/ibc-go/v6 v6.1.1-0.20230320072703-2bb93fc8c7a6/go.mod h1:CoPdnAHASMMY2lRJPPNiLT5vfb1S3x++Al3RvYelWf4= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= 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/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.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.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= 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/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -719,33 +916,34 @@ github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b 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.0.3-0.20180606204148-bd9c31933947/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/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= -github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= 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/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.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.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= 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= 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/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= 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/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= 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= @@ -753,6 +951,7 @@ 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.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= 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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -777,6 +976,7 @@ github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3d 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.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= 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= @@ -795,7 +995,7 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -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 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= @@ -803,22 +1003,19 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/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/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= 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/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= 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/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/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= 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/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= @@ -826,17 +1023,15 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/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/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= +github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= 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.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -873,8 +1068,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= 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/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= @@ -883,6 +1076,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +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= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -891,60 +1085,60 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -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/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/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.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= github.com/tidwall/btree v1.5.0 h1:iV0yVY/frd7r6qGBXfEYs7DH0gTDgrKTrDjS7xt/IyQ= github.com/tidwall/btree v1.5.0/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE= -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/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= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= +github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= 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 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= +github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= 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/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -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/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/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= -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.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= @@ -961,12 +1155,16 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= 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/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -981,14 +1179,15 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U 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-20191227163750-53104e6ec876/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= 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-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 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-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.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= @@ -999,7 +1198,6 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL 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= @@ -1008,12 +1206,12 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 h1:BEABXpNXLEz0WxtA+6CQIz2xkg80e+1zrhWyMcq8VzE= -golang.org/x/exp v0.0.0-20230131160201-f062dba9d201/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20221205204356-47842c84f3db h1:D/cFflL63o2KSLJIwjlcIt8PR064j/xsmdEJL/YvY/o= +golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -1027,22 +1225,21 @@ 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.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= 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= @@ -1051,7 +1248,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r 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-20190327091125-710a502c58a2/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= @@ -1061,7 +1257,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 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-20190827160401-ba9fcec4b297/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= @@ -1079,19 +1274,36 @@ 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-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= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 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-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-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/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.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +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-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 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= @@ -1101,8 +1313,23 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 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-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-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/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= 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= @@ -1114,8 +1341,11 @@ 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.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/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= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1146,6 +1376,7 @@ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7w 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-20200107162124-548cf772de50/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= @@ -1165,9 +1396,8 @@ 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-20200826173525-f9321e4c35a6/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-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1175,28 +1405,58 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/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-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/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-20210420205809-ac73e9fd8988/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-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-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210909193231-528a39cd75f3/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-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-20211124211545-fe61309f8881/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-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-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-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1208,6 +1468,7 @@ 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/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1215,15 +1476,16 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/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-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/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-20190311212946-11955173bddd/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-20190327201419-c70d86f8b7cf/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= @@ -1244,7 +1506,7 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn 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-20200108203644-89082a384178/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-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1273,16 +1535,26 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f 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/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.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= 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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/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 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +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= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= 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.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= @@ -1305,14 +1577,46 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= 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.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.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +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.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0 h1:JxJl2qQ85fRMPNvlZY/enexbxpCjLwGhZUtgfGeQ51I= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +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.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-20180518175338-11a468237815/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-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1320,6 +1624,7 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn 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-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 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= @@ -1327,6 +1632,7 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx 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= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= @@ -1354,12 +1660,120 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/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-20210126160654-44e461bb6506/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-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +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-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-20230125152338-dcaf20b6aeaa h1:qQPhfbPO23fwm/9lQr91L1u62Zo6cm+zI+slZT+uf+o= -google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= +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/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-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/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-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +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= +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.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.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= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +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.40.1/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/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.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +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= @@ -1372,23 +1786,25 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk= google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/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/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/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.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= 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= @@ -1406,14 +1822,12 @@ 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-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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 h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +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= @@ -1421,6 +1835,7 @@ 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.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= 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.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= @@ -1428,5 +1843,8 @@ 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= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tests/e2e/grants_test.go b/tests/e2e/grants_test.go index 0920fa0a3d..8494726c9d 100644 --- a/tests/e2e/grants_test.go +++ b/tests/e2e/grants_test.go @@ -3,8 +3,9 @@ package e2e_test import ( "fmt" "testing" - "time" + "github.com/CosmWasm/wasmd/x/wasm/ibctesting" + "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,9 +13,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/CosmWasm/wasmd/x/wasm/ibctesting" - "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestGrants(t *testing.T) { @@ -75,7 +73,7 @@ func TestGrants(t *testing.T) { filter: types.NewAllowAllMessagesFilter(), senderKey: otherPrivKey, transferAmount: myAmount, - expErr: sdkerrors.ErrUnauthorized, + expErr: authz.ErrNoAuthorizationFound, }, } for name, spec := range specs { @@ -84,7 +82,7 @@ func TestGrants(t *testing.T) { grant, err := types.NewContractGrant(contractAddr, spec.limit, spec.filter) require.NoError(t, err) authorization := types.NewContractExecutionAuthorization(*grant) - grantMsg, err := authz.NewMsgGrant(granterAddr, granteeAddr, authorization, time.Now().Add(time.Hour)) + grantMsg, err := authz.NewMsgGrant(granterAddr, granteeAddr, authorization, nil) // TODO: add expiration require.NoError(t, err) _, err = chain.SendMsgs(grantMsg) require.NoError(t, err) diff --git a/tests/e2e/ibc_fees_test.go b/tests/e2e/ibc_fees_test.go index fa315ffe60..e87ea3eed4 100644 --- a/tests/e2e/ibc_fees_test.go +++ b/tests/e2e/ibc_fees_test.go @@ -9,11 +9,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - ibcfee "github.com/cosmos/ibc-go/v4/modules/apps/29-fee/types" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v4/testing" + ibcfee "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -61,7 +61,7 @@ func TestIBCFeesTransfer(t *testing.T) { // when a transfer package is sent transferCoin := sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1)) - ibcPayloadMsg := ibctransfertypes.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, transferCoin, actorChainA.String(), receiver.String(), clienttypes.Height{}, uint64(time.Now().Add(time.Minute).UnixNano())) + ibcPayloadMsg := ibctransfertypes.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, transferCoin, actorChainA.String(), receiver.String(), clienttypes.Height{}, uint64(time.Now().Add(time.Minute).UnixNano()), "notional") ibcPackageFee := ibcfee.NewFee(oneToken, oneToken, sdk.Coins{}) feeMsg := ibcfee.NewMsgPayPacketFee(ibcPackageFee, ibctransfertypes.PortID, path.EndpointA.ChannelID, actorChainA.String(), nil) _, err = chainA.SendMsgs(feeMsg, ibcPayloadMsg) @@ -86,7 +86,7 @@ func TestIBCFeesTransfer(t *testing.T) { require.NoError(t, err) // and transfer from B to A - ibcPayloadMsg = ibctransfertypes.NewMsgTransfer(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, transferCoin, actorChainB.String(), receiver.String(), clienttypes.Height{}, uint64(time.Now().Add(time.Minute).UnixNano())) + ibcPayloadMsg = ibctransfertypes.NewMsgTransfer(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, transferCoin, actorChainB.String(), receiver.String(), clienttypes.Height{}, uint64(time.Now().Add(time.Minute).UnixNano()), "notional") ibcPackageFee = ibcfee.NewFee(oneToken, oneToken, sdk.Coins{}) feeMsg = ibcfee.NewMsgPayPacketFee(ibcPackageFee, ibctransfertypes.PortID, path.EndpointB.ChannelID, actorChainB.String(), nil) _, err = chainB.SendMsgs(feeMsg, ibcPayloadMsg) @@ -192,7 +192,7 @@ func TestIBCFeesWasm(t *testing.T) { require.NoError(t, err) // and when sent back from chain B to A - ibcPayloadMsg := ibctransfertypes.NewMsgTransfer(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, gotBalance, actorChainB.String(), actorChainA.String(), clienttypes.Height{}, uint64(time.Now().Add(time.Minute).UnixNano())) + ibcPayloadMsg := ibctransfertypes.NewMsgTransfer(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, gotBalance, actorChainB.String(), actorChainA.String(), clienttypes.Height{}, uint64(time.Now().Add(time.Minute).UnixNano()), "notional") ibcPackageFee = ibcfee.NewFee(oneToken, oneToken, sdk.Coins{}) feeMsg = ibcfee.NewMsgPayPacketFee(ibcPackageFee, ibctransfertypes.PortID, path.EndpointB.ChannelID, actorChainB.String(), nil) _, err = chainB.SendMsgs(feeMsg, ibcPayloadMsg) diff --git a/tests/e2e/ica_test.go b/tests/e2e/ica_test.go index 24c0623611..ec499ecb7f 100644 --- a/tests/e2e/ica_test.go +++ b/tests/e2e/ica_test.go @@ -7,10 +7,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - hosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v4/testing" + hosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -38,6 +38,8 @@ func TestICA(t *testing.T) { ownerAddr := sdk.AccAddress(controllerChain.SenderPrivKey.PubKey().Address()) msg := intertxtypes.NewMsgRegisterAccount(ownerAddr.String(), path.EndpointA.ConnectionID, "") res, err := controllerChain.SendMsgs(msg) + require.NoError(t, err) + chanID, portID, version := parseIBCChannelEvents(t, res) // next open channels on both sides @@ -48,7 +50,7 @@ func TestICA(t *testing.T) { Order: channeltypes.ORDERED, } path.EndpointB.ChannelConfig = &ibctesting.ChannelConfig{ - PortID: icatypes.PortID, + PortID: icatypes.HostPortID, Version: icatypes.Version, Order: channeltypes.ORDERED, } @@ -69,7 +71,7 @@ func TestICA(t *testing.T) { payloadMsg := banktypes.NewMsgSend(icaAddr, targetAddr, sdk.NewCoins(sendCoin)) msg2, err := intertxtypes.NewMsgSubmitTx(payloadMsg, path.EndpointA.ConnectionID, ownerAddr.String()) require.NoError(t, err) - res, err = controllerChain.SendMsgs(msg2) + _, err = controllerChain.SendMsgs(msg2) require.NoError(t, err) assert.Equal(t, 1, len(controllerChain.PendingSendPackets)) diff --git a/x/wasm/client/cli/gov_tx.go b/x/wasm/client/cli/gov_tx.go index c516be2932..d2a5e8ab28 100644 --- a/x/wasm/client/cli/gov_tx.go +++ b/x/wasm/client/cli/gov_tx.go @@ -18,7 +18,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/pkg/errors" "github.com/spf13/cobra" flag "github.com/spf13/pflag" @@ -32,7 +32,7 @@ func ProposalStoreCodeCmd() *cobra.Command { Short: "Submit a wasm binary proposal", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, _, _, _, err := getProposalInfo(cmd) if err != nil { return err } @@ -48,6 +48,22 @@ func ProposalStoreCodeCmd() *cobra.Command { if len(runAs) == 0 { return errors.New("run-as address is required") } + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return err + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) + if err != nil { + return err + } unpinCode, err := cmd.Flags().GetBool(flagUnpinCode) if err != nil { @@ -80,7 +96,6 @@ func ProposalStoreCodeCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } cmd.Flags().String(flagRunAs, "", "The address that is stored as code creator") @@ -91,9 +106,12 @@ func ProposalStoreCodeCmd() *cobra.Command { addInstantiatePermissionFlags(cmd) // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -149,7 +167,7 @@ func ProposalInstantiateContractCmd() *cobra.Command { Short: "Submit an instantiate wasm contract proposal", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, _, _, _, err := getProposalInfo(cmd) if err != nil { return err } @@ -166,6 +184,22 @@ func ProposalInstantiateContractCmd() *cobra.Command { if len(runAs) == 0 { return errors.New("run-as address is required") } + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return err + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) + if err != nil { + return err + } content := types.InstantiateContractProposal{ Title: proposalTitle, @@ -188,7 +222,6 @@ func ProposalInstantiateContractCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract during instantiation") cmd.Flags().String(flagLabel, "", "A human-readable name for this contract in lists") @@ -262,9 +295,12 @@ func ProposalInstantiateContract2Cmd() *cobra.Command { decoder.RegisterFlags(cmd.PersistentFlags(), "salt") // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -341,7 +377,12 @@ func ProposalStoreAndInstantiateContractCmd() *cobra.Command { if err != nil { return fmt.Errorf("admin %s", err) } - adminStr = info.GetAddress().String() + adminStrGet, err := info.GetAddress() + if err != nil { + return fmt.Errorf("Failed to get admin address with error: %s", err) + } + + adminStr = adminStrGet.String() } else { adminStr = addr.String() } @@ -387,8 +428,8 @@ func ProposalStoreAndInstantiateContractCmd() *cobra.Command { cmd.Flags().Bool(flagNoAdmin, false, "You must set this explicitly if you don't want an admin") addInstantiatePermissionFlags(cmd) // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck // SA1019: cli.FlagTitle is deprecated: use FlagTitle + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck // SA1019: cli.FlagDescription is deprecated: use FlagDescription cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") return cmd } @@ -399,7 +440,7 @@ func ProposalMigrateContractCmd() *cobra.Command { Short: "Submit a migrate wasm contract to a new code version proposal", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, _, _, _, err := getProposalInfo(cmd) if err != nil { return err } @@ -409,6 +450,23 @@ func ProposalMigrateContractCmd() *cobra.Command { return err } + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return err + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) + if err != nil { + return err + } + content := types.MigrateContractProposal{ Title: proposalTitle, Description: proposalDescr, @@ -427,13 +485,15 @@ func ProposalMigrateContractCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -443,7 +503,7 @@ func ProposalExecuteContractCmd() *cobra.Command { Short: "Submit a execute wasm contract proposal (run by any address)", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, _, _, _, err := getProposalInfo(cmd) if err != nil { return err } @@ -466,6 +526,22 @@ func ProposalExecuteContractCmd() *cobra.Command { if len(runAs) == 0 { return errors.New("run-as address is required") } + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return err + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) + if err != nil { + return err + } content := types.ExecuteContractProposal{ Title: proposalTitle, @@ -486,15 +562,17 @@ func ProposalExecuteContractCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } cmd.Flags().String(flagRunAs, "", "The address that is passed as sender to the contract on proposal execution") cmd.Flags().String(flagAmount, "", "Coins to send to the contract during instantiation") // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -504,7 +582,7 @@ func ProposalSudoContractCmd() *cobra.Command { Short: "Submit a sudo wasm contract proposal (to call privileged commands)", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, _, _, _, err := getProposalInfo(cmd) if err != nil { return err } @@ -512,6 +590,23 @@ func ProposalSudoContractCmd() *cobra.Command { contract := args[0] sudoMsg := []byte(args[1]) + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return err + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) + if err != nil { + return err + } + content := types.SudoContractProposal{ Title: proposalTitle, Description: proposalDescr, @@ -529,13 +624,15 @@ func ProposalSudoContractCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } // proposal flagsExecute - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -545,7 +642,7 @@ func ProposalUpdateContractAdminCmd() *cobra.Command { Short: "Submit a new admin for a contract proposal", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, _, _, _, err := getProposalInfo(cmd) if err != nil { return err } @@ -555,6 +652,23 @@ func ProposalUpdateContractAdminCmd() *cobra.Command { return err } + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return fmt.Errorf("deposit: %s", err) + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) + if err != nil { + return err + } + content := types.UpdateAdminProposal{ Title: proposalTitle, Description: proposalDescr, @@ -572,12 +686,14 @@ func ProposalUpdateContractAdminCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -587,7 +703,24 @@ func ProposalClearContractAdminCmd() *cobra.Command { Short: "Submit a clear admin for a contract to prevent further migrations proposal", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return fmt.Errorf("deposit: %s", err) + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) if err != nil { return err } @@ -608,12 +741,14 @@ func ProposalClearContractAdminCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -623,11 +758,27 @@ func ProposalPinCodesCmd() *cobra.Command { Short: "Submit a pin code proposal for pinning a code to cache", Args: cobra.MinimumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, _, _, _, err := getProposalInfo(cmd) if err != nil { return err } + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return fmt.Errorf("deposit: %s", err) + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) + if err != nil { + return err + } codeIds, err := parsePinCodesArgs(args) if err != nil { return err @@ -649,12 +800,14 @@ func ProposalPinCodesCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -676,11 +829,27 @@ func ProposalUnpinCodesCmd() *cobra.Command { Short: "Submit a unpin code proposal for unpinning a code to cache", Args: cobra.MinimumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, _, _, _, err := getProposalInfo(cmd) if err != nil { return err } + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return fmt.Errorf("deposit: %s", err) + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) + if err != nil { + return err + } codeIds, err := parsePinCodesArgs(args) if err != nil { return err @@ -702,12 +871,14 @@ func ProposalUnpinCodesCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -777,7 +948,24 @@ Example: $ %s tx gov submit-proposal update-instantiate-config 1:nobody 2:everybody 3:%s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm,%s1vx8knpllrj7n963p9ttd80w47kpacrhuts497x `, version.AppName, bech32Prefix, bech32Prefix)), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, proposalTitle, proposalDescr, deposit, err := getProposalInfo(cmd) + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal title: %s", err) + } + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck + if err != nil { + return fmt.Errorf("proposal description: %s", err) + } + depositArg, err := cmd.Flags().GetString(cli.FlagDeposit) + if err != nil { + return fmt.Errorf("deposit: %s", err) + } + deposit, err := sdk.ParseCoinsNormalized(depositArg) if err != nil { return err } @@ -801,12 +989,14 @@ $ %s tx gov submit-proposal update-instantiate-config 1:nobody 2:everybody 3:%s1 return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } // proposal flags - cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") - cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") + cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") //nolint:staticcheck + cmd.Flags().String(cli.FlagDescription, "", "Description of proposal") //nolint:staticcheck cmd.Flags().String(cli.FlagDeposit, "", "Deposit of proposal") + cmd.Flags().String(cli.FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)") //nolint:staticcheck + // type values must match the "ProposalHandler" "routes" in cli + cmd.Flags().String(cli.FlagProposalType, "", "Permission of proposal, types: store-code/instantiate/migrate/update-admin/clear-admin/text/parameter_change/software_upgrade") //nolint:staticcheck return cmd } @@ -816,12 +1006,12 @@ func getProposalInfo(cmd *cobra.Command) (client.Context, string, string, sdk.Co return client.Context{}, "", "", nil, err } - proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) + proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) //nolint:staticcheck // SA1019: cli.FlagTitle is deprecated: use FlagTitle instead. (staticcheck) if err != nil { return clientCtx, proposalTitle, "", nil, err } - proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) + proposalDescr, err := cmd.Flags().GetString(cli.FlagDescription) //nolint:staticcheck // SA1019: cli.FlagDescription is deprecated: use FlagDescription instead. (staticcheck) if err != nil { return client.Context{}, proposalTitle, proposalDescr, nil, err } diff --git a/x/wasm/client/cli/new_tx.go b/x/wasm/client/cli/new_tx.go index d7e477a9fe..dfdb6317ee 100644 --- a/x/wasm/client/cli/new_tx.go +++ b/x/wasm/client/cli/new_tx.go @@ -34,7 +34,6 @@ func MigrateContractCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, - SilenceUsage: true, } flags.AddTxFlagsToCmd(cmd) return cmd @@ -80,13 +79,12 @@ func UpdateContractAdminCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, - SilenceUsage: true, } flags.AddTxFlagsToCmd(cmd) return cmd } -func parseUpdateContractAdminArgs(args []string, cliCtx client.Context) (types.MsgUpdateAdmin, error) { +func parseUpdateContractAdminArgs(args []string, cliCtx client.Context) (types.MsgUpdateAdmin, error) { //nolint:unparam msg := types.MsgUpdateAdmin{ Sender: cliCtx.GetFromAddress().String(), Contract: args[0], @@ -117,7 +115,6 @@ func ClearContractAdminCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, - SilenceUsage: true, } flags.AddTxFlagsToCmd(cmd) return cmd diff --git a/x/wasm/client/cli/query.go b/x/wasm/client/cli/query.go index 3053737274..59949f9f01 100644 --- a/x/wasm/client/cli/query.go +++ b/x/wasm/client/cli/query.go @@ -28,7 +28,6 @@ func GetQueryCmd() *cobra.Command { DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, - SilenceUsage: true, } queryCmd.AddCommand( GetCmdListCode(), @@ -140,7 +139,6 @@ func GetCmdListCode() *cobra.Command { } return clientCtx.PrintProto(res) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "list codes") @@ -186,7 +184,6 @@ func GetCmdListContractByCode() *cobra.Command { } return clientCtx.PrintProto(res) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "list contracts by code") @@ -229,7 +226,6 @@ func GetCmdQueryCode() *cobra.Command { fmt.Printf("Downloading wasm code to %s\n", args[1]) return os.WriteFile(args[1], res.Data, 0o600) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) return cmd @@ -269,7 +265,6 @@ func GetCmdQueryCodeInfo() *cobra.Command { return clientCtx.PrintProto(res.CodeInfoResponse) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) return cmd @@ -305,7 +300,6 @@ func GetCmdGetContractInfo() *cobra.Command { } return clientCtx.PrintProto(res) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) return cmd @@ -320,7 +314,6 @@ func GetCmdGetContractState() *cobra.Command { DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, - SilenceUsage: true, } cmd.AddCommand( GetCmdGetContractStateAll(), @@ -364,7 +357,6 @@ func GetCmdGetContractStateAll() *cobra.Command { } return clientCtx.PrintProto(res) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "contract state") @@ -406,7 +398,6 @@ func GetCmdGetContractStateRaw() *cobra.Command { } return clientCtx.PrintProto(res) }, - SilenceUsage: true, } decoder.RegisterFlags(cmd.PersistentFlags(), "key argument") flags.AddQueryFlagsToCmd(cmd) @@ -455,7 +446,6 @@ func GetCmdGetContractStateSmart() *cobra.Command { } return clientCtx.PrintProto(res) }, - SilenceUsage: true, } decoder.RegisterFlags(cmd.PersistentFlags(), "query argument") flags.AddQueryFlagsToCmd(cmd) @@ -499,7 +489,6 @@ func GetCmdGetContractHistory() *cobra.Command { return clientCtx.PrintProto(res) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) @@ -512,7 +501,7 @@ func GetCmdListPinnedCode() *cobra.Command { cmd := &cobra.Command{ Use: "pinned", Short: "List all pinned code ids", - Long: "List all pinned code ids", + Long: "\t\tLong: List all pinned code ids,\n", Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -536,7 +525,6 @@ func GetCmdListPinnedCode() *cobra.Command { } return clientCtx.PrintProto(res) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "list codes") @@ -548,7 +536,7 @@ func GetCmdListContractsByCreator() *cobra.Command { cmd := &cobra.Command{ Use: "list-contracts-by-creator [creator]", Short: "List all contracts by creator", - Long: "List all contracts by creator", + Long: "\t\tLong: List all contracts by creator,\n", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -577,7 +565,6 @@ func GetCmdListContractsByCreator() *cobra.Command { } return clientCtx.PrintProto(res) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "list contracts by creator") @@ -666,7 +653,6 @@ func GetCmdQueryParams() *cobra.Command { return clientCtx.PrintProto(&res.Params) }, - SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) diff --git a/x/wasm/client/cli/tx.go b/x/wasm/client/cli/tx.go index 2f6dbf2fe4..11a28d0314 100644 --- a/x/wasm/client/cli/tx.go +++ b/x/wasm/client/cli/tx.go @@ -54,7 +54,6 @@ func GetTxCmd() *cobra.Command { DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, - SilenceUsage: true, } txCmd.AddCommand( StoreCodeCmd(), @@ -91,7 +90,6 @@ func StoreCodeCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, - SilenceUsage: true, } addInstantiatePermissionFlags(cmd) @@ -199,7 +197,7 @@ func InstantiateContractCmd() *cobra.Command { Long: fmt.Sprintf(`Creates a new instance of an uploaded wasm code with the given 'constructor' message. Each contract instance has a unique address assigned. Example: -$ %s tx wasm instantiate 1 '{"foo":"bar"}' --admin="$(%s keys show mykey -a)" \ +$ %s wasmd tx wasm instantiate 1 '{"foo":"bar"}' --admin="$(%s keys show mykey -a)" \ --from mykey --amount="100ustake" --label "local0.1.0" `, version.AppName, version.AppName), Aliases: []string{"start", "init", "inst", "i"}, @@ -218,7 +216,6 @@ $ %s tx wasm instantiate 1 '{"foo":"bar"}' --admin="$(%s keys show mykey -a)" \ } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract during instantiation") @@ -241,7 +238,7 @@ Each contract instance has a unique address assigned. They are assigned automati for special use cases, the given 'salt' argument and '--fix-msg' parameters can be used to generate a custom address. Predictable address example (also see '%s query wasm build-address -h'): -$ %s tx wasm instantiate2 1 '{"foo":"bar"}' $(echo -n "testing" | xxd -ps) --admin="$(%s keys show mykey -a)" \ +$ %s wasmd tx wasm instantiate2 1 '{"foo":"bar"}' $(echo -n "testing" | xxd -ps) --admin="$(%s keys show mykey -a)" \ --from mykey --amount="100ustake" --label "local0.1.0" \ --fix-msg `, version.AppName, version.AppName, version.AppName), @@ -279,7 +276,6 @@ $ %s tx wasm instantiate2 1 '{"foo":"bar"}' $(echo -n "testing" | xxd -ps) --adm } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, - SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract during instantiation") @@ -339,7 +335,11 @@ func parseInstantiateArgs(rawCodeID, initMsg string, kr keyring.Keyring, sender if err != nil { return nil, fmt.Errorf("admin %s", err) } - adminStr = info.GetAddress().String() + adminStrGet, err := info.GetAddress() + if err != nil { + return nil, fmt.Errorf("Failed to get admin address with error: %s", err) + } + adminStr = adminStrGet.String() } else { adminStr = addr.String() } @@ -379,7 +379,6 @@ func ExecuteContractCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, - SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract along with command") @@ -525,8 +524,8 @@ $ %s tx grant execution --allow-all-messages --ma default: return fmt.Errorf("%s authorization type not supported", args[1]) } - - grantMsg, err := authz.NewMsgGrant(clientCtx.GetFromAddress(), grantee, authorization, time.Unix(0, exp)) + expiration := time.Unix(0, exp) + grantMsg, err := authz.NewMsgGrant(clientCtx.GetFromAddress(), grantee, authorization, &expiration) if err != nil { return err } diff --git a/x/wasm/client/proposal_handler.go b/x/wasm/client/proposal_handler.go index 286d37d197..4ed139def2 100644 --- a/x/wasm/client/proposal_handler.go +++ b/x/wasm/client/proposal_handler.go @@ -4,22 +4,21 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/CosmWasm/wasmd/x/wasm/client/cli" - "github.com/CosmWasm/wasmd/x/wasm/client/rest" //nolint:staticcheck ) // ProposalHandlers define the wasm cli proposal types and rest handler. // Deprecated: the rest package will be removed. You can use the GRPC gateway instead var ProposalHandlers = []govclient.ProposalHandler{ - govclient.NewProposalHandler(cli.ProposalStoreCodeCmd, rest.StoreCodeProposalHandler), - govclient.NewProposalHandler(cli.ProposalInstantiateContractCmd, rest.InstantiateProposalHandler), - govclient.NewProposalHandler(cli.ProposalMigrateContractCmd, rest.MigrateProposalHandler), - govclient.NewProposalHandler(cli.ProposalExecuteContractCmd, rest.ExecuteProposalHandler), - govclient.NewProposalHandler(cli.ProposalSudoContractCmd, rest.SudoProposalHandler), - govclient.NewProposalHandler(cli.ProposalUpdateContractAdminCmd, rest.UpdateContractAdminProposalHandler), - govclient.NewProposalHandler(cli.ProposalClearContractAdminCmd, rest.ClearContractAdminProposalHandler), - govclient.NewProposalHandler(cli.ProposalPinCodesCmd, rest.PinCodeProposalHandler), - govclient.NewProposalHandler(cli.ProposalUnpinCodesCmd, rest.UnpinCodeProposalHandler), - govclient.NewProposalHandler(cli.ProposalUpdateInstantiateConfigCmd, rest.UpdateInstantiateConfigProposalHandler), - govclient.NewProposalHandler(cli.ProposalStoreAndInstantiateContractCmd, rest.EmptyRestHandler), - govclient.NewProposalHandler(cli.ProposalInstantiateContract2Cmd, rest.EmptyRestHandler), + govclient.NewProposalHandler(cli.ProposalStoreCodeCmd), + govclient.NewProposalHandler(cli.ProposalInstantiateContractCmd), + govclient.NewProposalHandler(cli.ProposalMigrateContractCmd), + govclient.NewProposalHandler(cli.ProposalExecuteContractCmd), + govclient.NewProposalHandler(cli.ProposalSudoContractCmd), + govclient.NewProposalHandler(cli.ProposalUpdateContractAdminCmd), + govclient.NewProposalHandler(cli.ProposalClearContractAdminCmd), + govclient.NewProposalHandler(cli.ProposalPinCodesCmd), + govclient.NewProposalHandler(cli.ProposalUnpinCodesCmd), + govclient.NewProposalHandler(cli.ProposalUpdateInstantiateConfigCmd), + govclient.NewProposalHandler(cli.ProposalStoreAndInstantiateContractCmd), + govclient.NewProposalHandler(cli.ProposalInstantiateContract2Cmd), } diff --git a/x/wasm/client/proposal_handler_test.go b/x/wasm/client/proposal_handler_test.go deleted file mode 100644 index 086e3cb3ae..0000000000 --- a/x/wasm/client/proposal_handler_test.go +++ /dev/null @@ -1,381 +0,0 @@ -package client - -import ( - "bytes" - "encoding/json" - "fmt" - "net/http" - "net/http/httptest" - "os" - "testing" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/gorilla/mux" - "github.com/stretchr/testify/require" - - "github.com/CosmWasm/wasmd/x/wasm/keeper" -) - -func TestGovRestHandlers(t *testing.T) { - type dict map[string]interface{} - var ( - anyAddress = "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz" - aBaseReq = dict{ - "from": anyAddress, - "memo": "rest test", - "chain_id": "testing", - "account_number": "1", - "sequence": "1", - "fees": []dict{{"denom": "ustake", "amount": "1000000"}}, - } - ) - encodingConfig := keeper.MakeEncodingConfig(t) - clientCtx := client.Context{}. - WithCodec(encodingConfig.Marshaler). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithInput(os.Stdin). - WithAccountRetriever(authtypes.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). - WithChainID("testing") - - // router setup as in gov/client/rest/tx.go - propSubRtr := mux.NewRouter().PathPrefix("/gov/proposals").Subrouter() - for _, ph := range ProposalHandlers { - r := ph.RESTHandler(clientCtx) - propSubRtr.HandleFunc(fmt.Sprintf("/%s", r.SubRoute), r.Handler).Methods("POST") - } - - specs := map[string]struct { - srcBody dict - srcPath string - expCode int - }{ - "store-code": { - srcPath: "/gov/proposals/wasm_store_code", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "store-code", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "wasm_byte_code": []byte("valid wasm byte code"), - "source": "https://example.com/", - "builder": "cosmwasm/workspace-optimizer:v0.12.9", - "code_hash": "79F174F09BFE3F83398BF7C147929D5F735161BD46D645E85216BB13BF91D42D", - "instantiate_permission": dict{ - "permission": "OnlyAddress", - "address": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - }, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusOK, - }, - "store-code without verification info": { - srcPath: "/gov/proposals/wasm_store_code", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "store-code", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "wasm_byte_code": []byte("valid wasm byte code"), - "instantiate_permission": dict{ - "permission": "OnlyAddress", - "address": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - }, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusOK, - }, - "store-code without permission": { - srcPath: "/gov/proposals/wasm_store_code", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "store-code", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "wasm_byte_code": []byte("valid wasm byte code"), - "source": "https://example.com/", - "builder": "cosmwasm/workspace-optimizer:v0.12.9", - "code_hash": "79F174F09BFE3F83398BF7C147929D5F735161BD46D645E85216BB13BF91D42D", - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusOK, - }, - "store-code invalid permission": { - srcPath: "/gov/proposals/wasm_store_code", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "store-code", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "wasm_byte_code": []byte("valid wasm byte code"), - "source": "https://example.com/", - "builder": "cosmwasm/workspace-optimizer:v0.12.9", - "code_hash": "79F174F09BFE3F83398BF7C147929D5F735161BD46D645E85216BB13BF91D42D", - "instantiate_permission": dict{ - "permission": "Nobody", - "address": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - }, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusBadRequest, - }, - "store-code with incomplete proposal data: blank title": { - srcPath: "/gov/proposals/wasm_store_code", - srcBody: dict{ - "title": "", - "description": "My proposal", - "type": "store-code", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "wasm_byte_code": []byte("valid wasm byte code"), - "source": "https://example.com/", - "code_hash": "79F174F09BFE3F83398BF7C147929D5F735161BD46D645E85216BB13BF91D42D", - "builder": "cosmwasm/workspace-optimizer:v0.12.9", - "instantiate_permission": dict{ - "permission": "OnlyAddress", - "address": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - }, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusBadRequest, - }, - "store-code with incomplete content data: no wasm_byte_code": { - srcPath: "/gov/proposals/wasm_store_code", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "store-code", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "wasm_byte_code": "", - "builder": "cosmwasm/workspace-optimizer:v0.12.9", - "source": "https://example.com/", - "code_hash": "79F174F09BFE3F83398BF7C147929D5F735161BD46D645E85216BB13BF91D42D", - "instantiate_permission": dict{ - "permission": "OnlyAddress", - "address": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - }, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusBadRequest, - }, - "store-code with incomplete content data: no builder": { - srcPath: "/gov/proposals/wasm_store_code", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "store-code", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "wasm_byte_code": "", - "source": "https://example.com/", - "code_hash": "79F174F09BFE3F83398BF7C147929D5F735161BD46D645E85216BB13BF91D42D", - "instantiate_permission": dict{ - "permission": "OnlyAddress", - "address": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - }, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusBadRequest, - }, - "store-code with incomplete content data: no code hash": { - srcPath: "/gov/proposals/wasm_store_code", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "store-code", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "wasm_byte_code": "", - "builder": "cosmwasm/workspace-optimizer:v0.12.9", - "source": "https://example.com/", - "instantiate_permission": dict{ - "permission": "OnlyAddress", - "address": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - }, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusBadRequest, - }, - "store-code with incomplete content data: no source": { - srcPath: "/gov/proposals/wasm_store_code", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "store-code", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "wasm_byte_code": "", - "builder": "cosmwasm/workspace-optimizer:v0.12.9", - "code_hash": "79F174F09BFE3F83398BF7C147929D5F735161BD46D645E85216BB13BF91D42D", - "instantiate_permission": dict{ - "permission": "OnlyAddress", - "address": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - }, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusBadRequest, - }, - "instantiate contract": { - srcPath: "/gov/proposals/wasm_instantiate", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "instantiate", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "admin": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "code_id": "1", - "label": "https://example.com/", - "msg": dict{"recipient": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz"}, - "funds": []dict{{"denom": "ustake", "amount": "100"}}, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusOK, - }, - "migrate contract": { - srcPath: "/gov/proposals/wasm_migrate", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "migrate", - "contract": "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", - "code_id": "1", - "msg": dict{"foo": "bar"}, - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusOK, - }, - "execute contract": { - srcPath: "/gov/proposals/wasm_execute", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "migrate", - "contract": "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", - "msg": dict{"foo": "bar"}, - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusOK, - }, - "execute contract fails with no run_as": { - srcPath: "/gov/proposals/wasm_execute", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "migrate", - "contract": "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", - "msg": dict{"foo": "bar"}, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusBadRequest, - }, - "execute contract fails with no message": { - srcPath: "/gov/proposals/wasm_execute", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "migrate", - "contract": "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", - "run_as": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusBadRequest, - }, - "sudo contract": { - srcPath: "/gov/proposals/wasm_sudo", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "migrate", - "contract": "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", - "msg": dict{"foo": "bar"}, - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusOK, - }, - "sudo contract fails with no message": { - srcPath: "/gov/proposals/wasm_sudo", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "migrate", - "contract": "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusBadRequest, - }, - "update contract admin": { - srcPath: "/gov/proposals/wasm_update_admin", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "migrate", - "contract": "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", - "new_admin": "cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz", - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusOK, - }, - "clear contract admin": { - srcPath: "/gov/proposals/wasm_clear_admin", - srcBody: dict{ - "title": "Test Proposal", - "description": "My proposal", - "type": "migrate", - "contract": "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", - "deposit": []dict{{"denom": "ustake", "amount": "10"}}, - "proposer": "cosmos1ve557a5g9yw2g2z57js3pdmcvd5my6g8ze20np", - "base_req": aBaseReq, - }, - expCode: http.StatusOK, - }, - } - for msg, spec := range specs { - t.Run(msg, func(t *testing.T) { - src, err := json.Marshal(spec.srcBody) - require.NoError(t, err) - - // when - r := httptest.NewRequest("POST", spec.srcPath, bytes.NewReader(src)) - w := httptest.NewRecorder() - propSubRtr.ServeHTTP(w, r) - - // then - require.Equal(t, spec.expCode, w.Code, w.Body.String()) - }) - } -} diff --git a/x/wasm/client/rest/gov.go b/x/wasm/client/rest/gov.go deleted file mode 100644 index c57e3a9ac5..0000000000 --- a/x/wasm/client/rest/gov.go +++ /dev/null @@ -1,547 +0,0 @@ -package rest - -import ( - "encoding/json" - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/CosmWasm/wasmd/x/wasm/types" -) - -type StoreCodeProposalJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - - RunAs string `json:"run_as" yaml:"run_as"` - // WASMByteCode can be raw or gzip compressed - WASMByteCode []byte `json:"wasm_byte_code" yaml:"wasm_byte_code"` - // InstantiatePermission to apply on contract creation, optional - InstantiatePermission *types.AccessConfig `json:"instantiate_permission" yaml:"instantiate_permission"` - - // UnpinCode indicates if the code should not be pinned as part of the proposal. - UnpinCode bool `json:"unpin_code" yaml:"unpin_code"` - - // Source is the URL where the code is hosted - Source string `json:"source" yaml:"source"` - // Builder is the docker image used to build the code deterministically, used for smart - // contract verification - Builder string `json:"builder" yaml:"builder"` - // CodeHash is the SHA256 sum of the code outputted by optimizer, used for smart contract verification - CodeHash []byte `json:"code_hash" yaml:"code_hash"` -} - -func (s StoreCodeProposalJSONReq) Content() govtypes.Content { - return &types.StoreCodeProposal{ - Title: s.Title, - Description: s.Description, - RunAs: s.RunAs, - WASMByteCode: s.WASMByteCode, - InstantiatePermission: s.InstantiatePermission, - UnpinCode: s.UnpinCode, - Source: s.Source, - Builder: s.Builder, - CodeHash: s.CodeHash, - } -} - -func (s StoreCodeProposalJSONReq) GetProposer() string { - return s.Proposer -} - -func (s StoreCodeProposalJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s StoreCodeProposalJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func StoreCodeProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "wasm_store_code", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req StoreCodeProposalJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type InstantiateProposalJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - - RunAs string `json:"run_as" yaml:"run_as"` - // Admin is an optional address that can execute migrations - Admin string `json:"admin,omitempty" yaml:"admin"` - Code uint64 `json:"code_id" yaml:"code_id"` - Label string `json:"label" yaml:"label"` - Msg json.RawMessage `json:"msg" yaml:"msg"` - Funds sdk.Coins `json:"funds" yaml:"funds"` -} - -func (s InstantiateProposalJSONReq) Content() govtypes.Content { - return &types.InstantiateContractProposal{ - Title: s.Title, - Description: s.Description, - RunAs: s.RunAs, - Admin: s.Admin, - CodeID: s.Code, - Label: s.Label, - Msg: types.RawContractMessage(s.Msg), - Funds: s.Funds, - } -} - -func (s InstantiateProposalJSONReq) GetProposer() string { - return s.Proposer -} - -func (s InstantiateProposalJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s InstantiateProposalJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func InstantiateProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "wasm_instantiate", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req InstantiateProposalJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type MigrateProposalJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - - Contract string `json:"contract" yaml:"contract"` - Code uint64 `json:"code_id" yaml:"code_id"` - Msg json.RawMessage `json:"msg" yaml:"msg"` -} - -func (s MigrateProposalJSONReq) Content() govtypes.Content { - return &types.MigrateContractProposal{ - Title: s.Title, - Description: s.Description, - Contract: s.Contract, - CodeID: s.Code, - Msg: types.RawContractMessage(s.Msg), - } -} - -func (s MigrateProposalJSONReq) GetProposer() string { - return s.Proposer -} - -func (s MigrateProposalJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s MigrateProposalJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func MigrateProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "wasm_migrate", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req MigrateProposalJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type ExecuteProposalJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - - Contract string `json:"contract" yaml:"contract"` - Msg json.RawMessage `json:"msg" yaml:"msg"` - // RunAs is the role that is passed to the contract's environment - RunAs string `json:"run_as" yaml:"run_as"` - Funds sdk.Coins `json:"funds" yaml:"funds"` -} - -func (s ExecuteProposalJSONReq) Content() govtypes.Content { - return &types.ExecuteContractProposal{ - Title: s.Title, - Description: s.Description, - Contract: s.Contract, - Msg: types.RawContractMessage(s.Msg), - RunAs: s.RunAs, - Funds: s.Funds, - } -} - -func (s ExecuteProposalJSONReq) GetProposer() string { - return s.Proposer -} - -func (s ExecuteProposalJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s ExecuteProposalJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func ExecuteProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "wasm_execute", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req ExecuteProposalJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type SudoProposalJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - - Contract string `json:"contract" yaml:"contract"` - Msg json.RawMessage `json:"msg" yaml:"msg"` -} - -func (s SudoProposalJSONReq) Content() govtypes.Content { - return &types.SudoContractProposal{ - Title: s.Title, - Description: s.Description, - Contract: s.Contract, - Msg: types.RawContractMessage(s.Msg), - } -} - -func (s SudoProposalJSONReq) GetProposer() string { - return s.Proposer -} - -func (s SudoProposalJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s SudoProposalJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func SudoProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "wasm_sudo", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req SudoProposalJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type UpdateAdminJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - - NewAdmin string `json:"new_admin" yaml:"new_admin"` - Contract string `json:"contract" yaml:"contract"` -} - -func (s UpdateAdminJSONReq) Content() govtypes.Content { - return &types.UpdateAdminProposal{ - Title: s.Title, - Description: s.Description, - Contract: s.Contract, - NewAdmin: s.NewAdmin, - } -} - -func (s UpdateAdminJSONReq) GetProposer() string { - return s.Proposer -} - -func (s UpdateAdminJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s UpdateAdminJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func UpdateContractAdminProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "wasm_update_admin", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req UpdateAdminJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type ClearAdminJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - - Contract string `json:"contract" yaml:"contract"` -} - -func (s ClearAdminJSONReq) Content() govtypes.Content { - return &types.ClearAdminProposal{ - Title: s.Title, - Description: s.Description, - Contract: s.Contract, - } -} - -func (s ClearAdminJSONReq) GetProposer() string { - return s.Proposer -} - -func (s ClearAdminJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s ClearAdminJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func ClearContractAdminProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "wasm_clear_admin", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req ClearAdminJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type PinCodeJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - - CodeIDs []uint64 `json:"code_ids" yaml:"code_ids"` -} - -func (s PinCodeJSONReq) Content() govtypes.Content { - return &types.PinCodesProposal{ - Title: s.Title, - Description: s.Description, - CodeIDs: s.CodeIDs, - } -} - -func (s PinCodeJSONReq) GetProposer() string { - return s.Proposer -} - -func (s PinCodeJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s PinCodeJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func PinCodeProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "pin_code", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req PinCodeJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type UnpinCodeJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - - CodeIDs []uint64 `json:"code_ids" yaml:"code_ids"` -} - -func (s UnpinCodeJSONReq) Content() govtypes.Content { - return &types.UnpinCodesProposal{ - Title: s.Title, - Description: s.Description, - CodeIDs: s.CodeIDs, - } -} - -func (s UnpinCodeJSONReq) GetProposer() string { - return s.Proposer -} - -func (s UnpinCodeJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s UnpinCodeJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func UnpinCodeProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "unpin_code", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req UnpinCodeJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type UpdateInstantiateConfigProposalJSONReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Proposer string `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - AccessConfigUpdates []types.AccessConfigUpdate `json:"access_config_updates" yaml:"access_config_updates"` -} - -func (s UpdateInstantiateConfigProposalJSONReq) Content() govtypes.Content { - return &types.UpdateInstantiateConfigProposal{ - Title: s.Title, - Description: s.Description, - AccessConfigUpdates: s.AccessConfigUpdates, - } -} - -func (s UpdateInstantiateConfigProposalJSONReq) GetProposer() string { - return s.Proposer -} - -func (s UpdateInstantiateConfigProposalJSONReq) GetDeposit() sdk.Coins { - return s.Deposit -} - -func (s UpdateInstantiateConfigProposalJSONReq) GetBaseReq() rest.BaseReq { - return s.BaseReq -} - -func UpdateInstantiateConfigProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "update_instantiate_config", - Handler: func(w http.ResponseWriter, r *http.Request) { - var req UpdateInstantiateConfigProposalJSONReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - toStdTxResponse(cliCtx, w, req) - }, - } -} - -type wasmProposalData interface { - Content() govtypes.Content - GetProposer() string - GetDeposit() sdk.Coins - GetBaseReq() rest.BaseReq -} - -func toStdTxResponse(cliCtx client.Context, w http.ResponseWriter, data wasmProposalData) { - proposerAddr, err := sdk.AccAddressFromBech32(data.GetProposer()) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - msg, err := govtypes.NewMsgSubmitProposal(data.Content(), data.GetDeposit(), proposerAddr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - baseReq := data.GetBaseReq().Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, msg) -} - -func EmptyRestHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "unsupported", - Handler: func(w http.ResponseWriter, r *http.Request) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "Legacy REST Routes are not supported for gov proposals") - }, - } -} diff --git a/x/wasm/client/rest/new_tx.go b/x/wasm/client/rest/new_tx.go deleted file mode 100644 index b261fd7fb7..0000000000 --- a/x/wasm/client/rest/new_tx.go +++ /dev/null @@ -1,86 +0,0 @@ -package rest - -import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" - - "github.com/CosmWasm/wasmd/x/wasm/types" -) - -func registerNewTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc("/wasm/contract/{contractAddr}/admin", setContractAdminHandlerFn(cliCtx)).Methods("PUT") - r.HandleFunc("/wasm/contract/{contractAddr}/code", migrateContractHandlerFn(cliCtx)).Methods("PUT") -} - -type migrateContractReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Admin string `json:"admin,omitempty" yaml:"admin"` - CodeID uint64 `json:"code_id" yaml:"code_id"` - Msg []byte `json:"msg,omitempty" yaml:"msg"` -} - -type updateContractAdministrateReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Admin string `json:"admin,omitempty" yaml:"admin"` -} - -func setContractAdminHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req updateContractAdministrateReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - vars := mux.Vars(r) - contractAddr := vars["contractAddr"] - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := &types.MsgUpdateAdmin{ - Sender: req.BaseReq.From, - NewAdmin: req.Admin, - Contract: contractAddr, - } - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} - -func migrateContractHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req migrateContractReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - vars := mux.Vars(r) - contractAddr := vars["contractAddr"] - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := &types.MsgMigrateContract{ - Sender: req.BaseReq.From, - Contract: contractAddr, - CodeID: req.CodeID, - Msg: req.Msg, - } - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} diff --git a/x/wasm/client/rest/query.go b/x/wasm/client/rest/query.go deleted file mode 100644 index d497d23900..0000000000 --- a/x/wasm/client/rest/query.go +++ /dev/null @@ -1,270 +0,0 @@ -package rest - -import ( - "encoding/base64" - "encoding/hex" - "encoding/json" - "fmt" - "net/http" - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" - - "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/CosmWasm/wasmd/x/wasm/types" -) - -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc("/wasm/code", listCodesHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc("/wasm/code/{codeID}", queryCodeHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc("/wasm/code/{codeID}/contracts", listContractsByCodeHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc("/wasm/contract/{contractAddr}", queryContractHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc("/wasm/contract/{contractAddr}/state", queryContractStateAllHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc("/wasm/contract/{contractAddr}/history", queryContractHistoryFn(cliCtx)).Methods("GET") - r.HandleFunc("/wasm/contract/{contractAddr}/smart/{query}", queryContractStateSmartHandlerFn(cliCtx)).Queries("encoding", "{encoding}").Methods("GET") - r.HandleFunc("/wasm/contract/{contractAddr}/raw/{key}", queryContractStateRawHandlerFn(cliCtx)).Queries("encoding", "{encoding}").Methods("GET") -} - -func listCodesHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, keeper.QueryListCode) - res, height, err := cliCtx.Query(route) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, json.RawMessage(res)) - } -} - -func queryCodeHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - codeID, err := strconv.ParseUint(mux.Vars(r)["codeID"], 10, 64) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s/%d", types.QuerierRoute, keeper.QueryGetCode, codeID) - res, height, err := cliCtx.Query(route) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - if len(res) == 0 { - rest.WriteErrorResponse(w, http.StatusNotFound, "contract not found") - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, json.RawMessage(res)) - } -} - -func listContractsByCodeHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - codeID, err := strconv.ParseUint(mux.Vars(r)["codeID"], 10, 64) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s/%d", types.QuerierRoute, keeper.QueryListContractByCode, codeID) - res, height, err := cliCtx.Query(route) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, json.RawMessage(res)) - } -} - -func queryContractHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - addr, err := sdk.AccAddressFromBech32(mux.Vars(r)["contractAddr"]) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s/%s", types.QuerierRoute, keeper.QueryGetContract, addr.String()) - res, height, err := cliCtx.Query(route) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, json.RawMessage(res)) - } -} - -func queryContractStateAllHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - addr, err := sdk.AccAddressFromBech32(mux.Vars(r)["contractAddr"]) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s/%s/%s", types.QuerierRoute, keeper.QueryGetContractState, addr.String(), keeper.QueryMethodContractStateAll) - res, height, err := cliCtx.Query(route) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // parse res - var resultData []types.Model - err = json.Unmarshal(res, &resultData) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, resultData) - } -} - -func queryContractStateRawHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - decoder := newArgDecoder(hex.DecodeString) - addr, err := sdk.AccAddressFromBech32(mux.Vars(r)["contractAddr"]) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - decoder.encoding = mux.Vars(r)["encoding"] - queryData, err := decoder.DecodeString(mux.Vars(r)["key"]) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s/%s/%s", types.QuerierRoute, keeper.QueryGetContractState, addr.String(), keeper.QueryMethodContractStateRaw) - res, height, err := cliCtx.QueryWithData(route, queryData) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - cliCtx = cliCtx.WithHeight(height) - // ensure this is base64 encoded - encoded := base64.StdEncoding.EncodeToString(res) - rest.PostProcessResponse(w, cliCtx, encoded) - } -} - -type smartResponse struct { - Smart []byte `json:"smart"` -} - -func queryContractStateSmartHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - decoder := newArgDecoder(hex.DecodeString) - addr, err := sdk.AccAddressFromBech32(mux.Vars(r)["contractAddr"]) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - decoder.encoding = mux.Vars(r)["encoding"] - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s/%s/%s", types.QuerierRoute, keeper.QueryGetContractState, addr.String(), keeper.QueryMethodContractStateSmart) - - queryData, err := decoder.DecodeString(mux.Vars(r)["query"]) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - res, height, err := cliCtx.QueryWithData(route, queryData) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - // return as raw bytes (to be base64-encoded) - responseData := smartResponse{Smart: res} - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, responseData) - } -} - -func queryContractHistoryFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - addr, err := sdk.AccAddressFromBech32(mux.Vars(r)["contractAddr"]) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s/%s", types.QuerierRoute, keeper.QueryContractHistory, addr.String()) - res, height, err := cliCtx.Query(route) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, json.RawMessage(res)) - } -} - -type argumentDecoder struct { - // dec is the default decoder - dec func(string) ([]byte, error) - encoding string -} - -func newArgDecoder(def func(string) ([]byte, error)) *argumentDecoder { - return &argumentDecoder{dec: def} -} - -func (a *argumentDecoder) DecodeString(s string) ([]byte, error) { - switch a.encoding { - case "hex": - return hex.DecodeString(s) - case "base64": - return base64.StdEncoding.DecodeString(s) - default: - return a.dec(s) - } -} diff --git a/x/wasm/client/rest/rest.go b/x/wasm/client/rest/rest.go deleted file mode 100644 index 95339d3aa0..0000000000 --- a/x/wasm/client/rest/rest.go +++ /dev/null @@ -1,15 +0,0 @@ -// Deprecated: the rest package will be removed. You can use the GRPC gateway instead -package rest - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/gorilla/mux" -) - -// RegisterRoutes registers staking-related REST handlers to a router -// Deprecated: the rest package will be removed. You can use the GRPC gateway instead -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) - registerNewTxRoutes(cliCtx, r) -} diff --git a/x/wasm/client/rest/tx.go b/x/wasm/client/rest/tx.go deleted file mode 100644 index 17407c4b6a..0000000000 --- a/x/wasm/client/rest/tx.go +++ /dev/null @@ -1,149 +0,0 @@ -package rest - -import ( - "net/http" - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" - - "github.com/CosmWasm/wasmd/x/wasm/ioutils" - "github.com/CosmWasm/wasmd/x/wasm/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc("/wasm/code", storeCodeHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc("/wasm/code/{codeId}", instantiateContractHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc("/wasm/contract/{contractAddr}", executeContractHandlerFn(cliCtx)).Methods("POST") -} - -type storeCodeReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - WasmBytes []byte `json:"wasm_bytes"` -} - -type instantiateContractReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Label string `json:"label" yaml:"label"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - Admin string `json:"admin,omitempty" yaml:"admin"` - Msg []byte `json:"msg" yaml:"msg"` -} - -type executeContractReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - ExecMsg []byte `json:"exec_msg" yaml:"exec_msg"` - Amount sdk.Coins `json:"coins" yaml:"coins"` -} - -func storeCodeHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req storeCodeReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - var err error - wasm := req.WasmBytes - - // gzip the wasm file - if ioutils.IsWasm(wasm) { - wasm, err = ioutils.GzipIt(wasm) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - } else if !ioutils.IsGzip(wasm) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "Invalid input file, use wasm binary or zip") - return - } - - // build and sign the transaction, then broadcast to Tendermint - msg := types.MsgStoreCode{ - Sender: req.BaseReq.From, - WASMByteCode: wasm, - } - - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} - -func instantiateContractHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req instantiateContractReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - vars := mux.Vars(r) - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - // get the id of the code to instantiate - codeID, err := strconv.ParseUint(vars["codeId"], 10, 64) - if err != nil { - return - } - - msg := types.MsgInstantiateContract{ - Sender: req.BaseReq.From, - CodeID: codeID, - Label: req.Label, - Funds: req.Deposit, - Msg: req.Msg, - Admin: req.Admin, - } - - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} - -func executeContractHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req executeContractReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - vars := mux.Vars(r) - contractAddr := vars["contractAddr"] - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := types.MsgExecuteContract{ - Sender: req.BaseReq.From, - Contract: contractAddr, - Msg: req.ExecMsg, - Funds: req.Amount, - } - - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} diff --git a/x/wasm/genesis_test.go b/x/wasm/genesis_test.go index 9d968f87a9..0de7ee1dca 100644 --- a/x/wasm/genesis_test.go +++ b/x/wasm/genesis_test.go @@ -30,7 +30,7 @@ func TestInitGenesis(t *testing.T) { require.NoError(t, err) assertStoreCodeResponse(t, res.Data, 1) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := initMsg{ Verifier: fred, Beneficiary: bob, @@ -80,7 +80,8 @@ func TestInitGenesis(t *testing.T) { q2 := newData.module.LegacyQuerierHandler(nil) // initialize new app with genstate - InitGenesis(newData.ctx, &newData.keeper, *genState) + _, err = InitGenesis(newData.ctx, &newData.keeper, *genState) + require.NoError(t, err) // run same checks again on newdata, to make sure it was reinitialized correctly assertCodeList(t, q2, newData.ctx, 1) diff --git a/x/wasm/handler.go b/x/wasm/handler.go index b350e7d37c..3b245f7102 100644 --- a/x/wasm/handler.go +++ b/x/wasm/handler.go @@ -25,7 +25,7 @@ func NewHandler(k types.ContractOpsKeeper) sdk.Handler { err error ) switch msg := msg.(type) { - case *MsgStoreCode: //nolint:typecheck + case *MsgStoreCode: res, err = msgServer.StoreCode(sdk.WrapSDKContext(ctx), msg) case *MsgInstantiateContract: res, err = msgServer.InstantiateContract(sdk.WrapSDKContext(ctx), msg) diff --git a/x/wasm/ibc.go b/x/wasm/ibc.go index c0f2fda6b0..fbf402b3d4 100644 --- a/x/wasm/ibc.go +++ b/x/wasm/ibc.go @@ -3,14 +3,15 @@ package wasm import ( "math" + sdkerrors "cosmossdk.io/errors" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibcexported "github.com/cosmos/ibc-go/v4/modules/core/exported" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" + host "github.com/cosmos/ibc-go/v6/modules/core/24-host" + ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported" "github.com/CosmWasm/wasmd/x/wasm/types" ) @@ -50,7 +51,7 @@ func (i IBCHandler) OnChanOpenInit( } contractAddr, err := ContractFromPortID(portID) if err != nil { - return "", sdkerrors.Wrapf(err, "contract port id") + return version, sdkerrors.Wrapf(err, "contract port id") } msg := wasmvmtypes.IBCChannelOpenMsg{ @@ -69,7 +70,7 @@ func (i IBCHandler) OnChanOpenInit( // Allow contracts to return a version (or default to proposed version if unset) acceptedVersion, err := i.keeper.OnOpenChannel(ctx, contractAddr, msg) if err != nil { - return "", err + return version, err } if acceptedVersion == "" { acceptedVersion = version @@ -77,7 +78,7 @@ func (i IBCHandler) OnChanOpenInit( // Claim channel capability passed back by IBC module if err := i.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return "", sdkerrors.Wrap(err, "claim capability") + return version, sdkerrors.Wrap(err, "claim capability") } return acceptedVersion, nil } diff --git a/x/wasm/ibc_integration_test.go b/x/wasm/ibc_integration_test.go index 3df273b206..4ff71dbe55 100644 --- a/x/wasm/ibc_integration_test.go +++ b/x/wasm/ibc_integration_test.go @@ -5,9 +5,9 @@ import ( wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v4/testing" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -17,7 +17,7 @@ import ( ) func TestOnChanOpenInitVersion(t *testing.T) { - const startVersion = "v1" + const startVersion = "v2" specs := map[string]struct { contractRsp *wasmvmtypes.IBC3ChannelOpenResponse expVersion string diff --git a/x/wasm/ibc_reflect_test.go b/x/wasm/ibc_reflect_test.go index 2103878147..ef408444c1 100644 --- a/x/wasm/ibc_reflect_test.go +++ b/x/wasm/ibc_reflect_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/assert" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v4/testing" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/stretchr/testify/require" diff --git a/x/wasm/ibc_test.go b/x/wasm/ibc_test.go index ee63c7fb02..6195a39d17 100644 --- a/x/wasm/ibc_test.go +++ b/x/wasm/ibc_test.go @@ -4,8 +4,8 @@ import ( "testing" wasmvmtypes "github.com/CosmWasm/wasmvm/types" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" "github.com/stretchr/testify/assert" ) diff --git a/x/wasm/ibctesting/chain.go b/x/wasm/ibctesting/chain.go index bd6767316f..1a88ed7e5f 100644 --- a/x/wasm/ibctesting/chain.go +++ b/x/wasm/ibctesting/chain.go @@ -1,36 +1,38 @@ package ibctesting import ( + "context" "fmt" "testing" "time" + tmprotoversion "github.com/tendermint/tendermint/proto/tendermint/version" + + sdkerrors "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" "github.com/cosmos/cosmos-sdk/x/staking/teststaking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v4/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" - "github.com/cosmos/ibc-go/v4/modules/core/exported" - "github.com/cosmos/ibc-go/v4/modules/core/types" - ibctmtypes "github.com/cosmos/ibc-go/v4/modules/light-clients/07-tendermint/types" - ibctesting "github.com/cosmos/ibc-go/v4/testing" - "github.com/cosmos/ibc-go/v4/testing/mock" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v6/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v6/modules/core/24-host" + "github.com/cosmos/ibc-go/v6/modules/core/exported" + "github.com/cosmos/ibc-go/v6/modules/core/types" + ibctmtypes "github.com/cosmos/ibc-go/v6/modules/light-clients/07-tendermint/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" + "github.com/cosmos/ibc-go/v6/testing/mock" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmprotoversion "github.com/tendermint/tendermint/proto/tendermint/version" tmtypes "github.com/tendermint/tendermint/types" tmversion "github.com/tendermint/tendermint/version" @@ -478,7 +480,7 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, AppHash: chain.CurrentHeader.AppHash, LastResultsHash: tmhash.Sum([]byte("last_results_hash")), EvidenceHash: tmhash.Sum([]byte("evidence_hash")), - ProposerAddress: tmValSet.Proposer.Address, //nolint:staticcheck + ProposerAddress: tmValSet.Proposer.Address, } hhash := tmHeader.Hash() @@ -592,3 +594,34 @@ func (chain *TestChain) Balance(acc sdk.AccAddress, denom string) sdk.Coin { func (chain *TestChain) AllBalances(acc sdk.AccAddress) sdk.Coins { return chain.App.BankKeeper.GetAllBalances(chain.GetContext(), acc) } + +func MakeCommit(ctx context.Context, blockID tmtypes.BlockID, height int64, round int32, voteSet *tmtypes.VoteSet, validators []tmtypes.PrivValidator, now time.Time) (*tmtypes.Commit, error) { + // all sign + for i := 0; i < len(validators); i++ { + pubKey, err := validators[i].GetPubKey() + if err != nil { + return nil, err + } + vote := &tmtypes.Vote{ + ValidatorAddress: pubKey.Address(), + ValidatorIndex: int32(i), + Height: height, + Round: round, + Type: tmproto.PrecommitType, + BlockID: blockID, + Timestamp: now, + } + + v := vote.ToProto() + + if err := validators[i].SignVote(voteSet.ChainID(), v); err != nil { + return nil, err + } + vote.Signature = v.Signature + if _, err := voteSet.AddVote(vote); err != nil { + return nil, err + } + } + + return voteSet.MakeCommit(), nil +} diff --git a/x/wasm/ibctesting/coordinator.go b/x/wasm/ibctesting/coordinator.go index 9ceadc0a76..c0d8d4bfef 100644 --- a/x/wasm/ibctesting/coordinator.go +++ b/x/wasm/ibctesting/coordinator.go @@ -6,9 +6,9 @@ import ( "testing" "time" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibctesting "github.com/cosmos/ibc-go/v4/testing" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v6/modules/core/24-host" + ibctesting "github.com/cosmos/ibc-go/v6/testing" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/wasm/ibctesting/endpoint.go b/x/wasm/ibctesting/endpoint.go index e56c5d06ef..4e20561d72 100644 --- a/x/wasm/ibctesting/endpoint.go +++ b/x/wasm/ibctesting/endpoint.go @@ -4,14 +4,14 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v4/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" - "github.com/cosmos/ibc-go/v4/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v4/modules/light-clients/07-tendermint/types" - ibctesting "github.com/cosmos/ibc-go/v4/testing" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v6/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v6/modules/core/24-host" + "github.com/cosmos/ibc-go/v6/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v6/modules/light-clients/07-tendermint/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" "github.com/stretchr/testify/require" ) @@ -301,7 +301,8 @@ func (endpoint *Endpoint) ChanOpenTry() error { endpoint.ChannelConfig.PortID, endpoint.ChannelConfig.Version, endpoint.ChannelConfig.Order, []string{endpoint.ConnectionID}, endpoint.Counterparty.ChannelConfig.PortID, endpoint.Counterparty.ChannelID, endpoint.Counterparty.ChannelConfig.Version, - proof, height, + proof, + height, endpoint.Chain.SenderAccount.GetAddress().String(), ) res, err := endpoint.Chain.SendMsgs(msg) @@ -390,8 +391,13 @@ func (endpoint *Endpoint) ChanCloseConfirm() error { func (endpoint *Endpoint) SendPacket(packet exported.PacketI) error { channelCap := endpoint.Chain.GetChannelCapability(packet.GetSourcePort(), packet.GetSourceChannel()) + timeoutHeight := clienttypes.Height{ + RevisionNumber: packet.GetTimeoutHeight().GetRevisionNumber(), + RevisionHeight: packet.GetTimeoutHeight().GetRevisionHeight(), + } + // no need to send message, acting as a module - err := endpoint.Chain.App.IBCKeeper.ChannelKeeper.SendPacket(endpoint.Chain.GetContext(), channelCap, packet) + _, err := endpoint.Chain.App.IBCKeeper.ChannelKeeper.SendPacket(endpoint.Chain.GetContext(), channelCap, packet.GetSourcePort(), packet.GetSourceChannel(), timeoutHeight, packet.GetTimeoutTimestamp(), packet.GetData()) if err != nil { return err } diff --git a/x/wasm/ibctesting/event_utils.go b/x/wasm/ibctesting/event_utils.go index 0933dadd3f..abf977d96b 100644 --- a/x/wasm/ibctesting/event_utils.go +++ b/x/wasm/ibctesting/event_utils.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/wasm/ibctesting/faucet.go b/x/wasm/ibctesting/faucet.go index 4510f2ded4..420c588d08 100644 --- a/x/wasm/ibctesting/faucet.go +++ b/x/wasm/ibctesting/faucet.go @@ -1,6 +1,7 @@ package ibctesting import ( + "cosmossdk.io/math" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -10,7 +11,7 @@ import ( ) // Fund an address with the given amount in default denom -func (chain *TestChain) Fund(addr sdk.AccAddress, amount sdk.Int) { +func (chain *TestChain) Fund(addr sdk.AccAddress, amount math.Int) { require.NoError(chain.t, chain.sendMsgs(&banktypes.MsgSend{ FromAddress: chain.SenderAccount.GetAddress().String(), ToAddress: addr.String(), diff --git a/x/wasm/ibctesting/path.go b/x/wasm/ibctesting/path.go index 5e861325f0..c402517f6a 100644 --- a/x/wasm/ibctesting/path.go +++ b/x/wasm/ibctesting/path.go @@ -5,8 +5,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v4/testing" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" ) // Path contains two endpoints representing two chains connected over IBC diff --git a/x/wasm/ibctesting/wasm.go b/x/wasm/ibctesting/wasm.go index 0546f477eb..b49e9c1b88 100644 --- a/x/wasm/ibctesting/wasm.go +++ b/x/wasm/ibctesting/wasm.go @@ -8,9 +8,8 @@ import ( "os" "strings" - ibctesting "github.com/cosmos/ibc-go/v4/testing" - sdk "github.com/cosmos/cosmos-sdk/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" "github.com/golang/protobuf/proto" //nolint "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" @@ -56,11 +55,9 @@ func (chain *TestChain) StoreCode(byteCode []byte) types.MsgStoreCodeResponse { } r, err := chain.SendMsgs(storeMsg) require.NoError(chain.t, err) - protoResult := chain.parseSDKResultData(r) - require.Len(chain.t, protoResult.Data, 1) - // unmarshal protobuf response from data + var pInstResp types.MsgStoreCodeResponse - require.NoError(chain.t, pInstResp.Unmarshal(protoResult.Data[0].Data)) + require.NoError(chain.t, pInstResp.Unmarshal(r.MsgResponses[0].Value)) require.NotEmpty(chain.t, pInstResp.CodeID) require.NotEmpty(chain.t, pInstResp.Checksum) return pInstResp @@ -78,11 +75,9 @@ func (chain *TestChain) InstantiateContract(codeID uint64, initMsg []byte) sdk.A r, err := chain.SendMsgs(instantiateMsg) require.NoError(chain.t, err) - protoResult := chain.parseSDKResultData(r) - require.Len(chain.t, protoResult.Data, 1) var pExecResp types.MsgInstantiateContractResponse - require.NoError(chain.t, pExecResp.Unmarshal(protoResult.Data[0].Data)) + require.NoError(chain.t, pExecResp.Unmarshal(r.MsgResponses[0].Value)) a, err := sdk.AccAddressFromBech32(pExecResp.Address) require.NoError(chain.t, err) return a @@ -126,12 +121,6 @@ func (chain *TestChain) SmartQuery(contractAddr string, queryMsg interface{}, re return json.Unmarshal(resp.Data, response) } -func (chain *TestChain) parseSDKResultData(r *sdk.Result) sdk.TxMsgData { - var protoResult sdk.TxMsgData - require.NoError(chain.t, proto.Unmarshal(r.Data, &protoResult)) - return protoResult -} - // ContractInfo is a helper function to returns the ContractInfo for the given contract address func (chain *TestChain) ContractInfo(contractAddr sdk.AccAddress) *types.ContractInfo { return chain.App.WasmKeeper.GetContractInfo(chain.GetContext(), contractAddr) diff --git a/x/wasm/keeper/addresses_test.go b/x/wasm/keeper/addresses_test.go index fbcc607fc5..6c5de5e7bb 100644 --- a/x/wasm/keeper/addresses_test.go +++ b/x/wasm/keeper/addresses_test.go @@ -1,10 +1,11 @@ -package keeper +package keeper_test import ( "encoding/json" "fmt" "testing" + "github.com/CosmWasm/wasmd/x/wasm/keeper" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" tmbytes "github.com/tendermint/tendermint/libs/bytes" @@ -35,7 +36,7 @@ func TestBuildContractAddress(t *testing.T) { for i, spec := range specs { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { // when - gotAddr := BuildContractAddressPredictable(spec.In.Checksum, spec.In.Creator, spec.In.Salt.Bytes(), []byte(spec.In.Msg)) + gotAddr := keeper.BuildContractAddressPredictable(spec.In.Checksum, spec.In.Creator, spec.In.Salt.Bytes(), []byte(spec.In.Msg)) require.Equal(t, spec.Out.Address.String(), gotAddr.String()) require.NoError(t, sdk.VerifyAddressFormat(gotAddr)) diff --git a/x/wasm/keeper/ante.go b/x/wasm/keeper/ante.go index 1ffd34befd..08dfdf64b4 100644 --- a/x/wasm/keeper/ante.go +++ b/x/wasm/keeper/ante.go @@ -3,6 +3,7 @@ package keeper import ( "encoding/binary" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/CosmWasm/wasmd/x/wasm/types" @@ -10,11 +11,11 @@ import ( // CountTXDecorator ante handler to count the tx position in a block. type CountTXDecorator struct { - storeKey sdk.StoreKey + storeKey storetypes.StoreKey } // NewCountTXDecorator constructor -func NewCountTXDecorator(storeKey sdk.StoreKey) *CountTXDecorator { +func NewCountTXDecorator(storeKey storetypes.StoreKey) *CountTXDecorator { return &CountTXDecorator{storeKey: storeKey} } diff --git a/x/wasm/keeper/ante_test.go b/x/wasm/keeper/ante_test.go index fa64b62fe3..366ee2c72b 100644 --- a/x/wasm/keeper/ante_test.go +++ b/x/wasm/keeper/ante_test.go @@ -9,6 +9,7 @@ import ( "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/cosmos/cosmos-sdk/store" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -23,7 +24,7 @@ func TestCountTxDecorator(t *testing.T) { keyWasm := sdk.NewKVStoreKey(types.StoreKey) db := dbm.NewMemDB() ms := store.NewCommitMultiStore(db) - ms.MountStoreWithDB(keyWasm, sdk.StoreTypeIAVL, db) + ms.MountStoreWithDB(keyWasm, storetypes.StoreTypeIAVL, db) require.NoError(t, ms.LoadLatestVersion()) const myCurrentBlockHeight = 100 @@ -115,7 +116,7 @@ func TestCountTxDecorator(t *testing.T) { func TestLimitSimulationGasDecorator(t *testing.T) { var ( hundred sdk.Gas = 100 - zero sdk.Gas = 0 + zero sdk.Gas ) specs := map[string]struct { customLimit *sdk.Gas @@ -176,7 +177,8 @@ func TestLimitSimulationGasDecorator(t *testing.T) { return } ante := keeper.NewLimitSimulationGasDecorator(spec.customLimit) - ante.AnteHandle(ctx, nil, spec.simulation, nextAnte) + _, err := ante.AnteHandle(ctx, nil, spec.simulation, nextAnte) + require.NoError(t, err) }) } } diff --git a/x/wasm/keeper/authz_policy_test.go b/x/wasm/keeper/authz_policy_test.go index f39cc9d1b3..288b3bd507 100644 --- a/x/wasm/keeper/authz_policy_test.go +++ b/x/wasm/keeper/authz_policy_test.go @@ -1,4 +1,4 @@ -package keeper +package keeper_test import ( "testing" @@ -6,68 +6,69 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" + "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestDefaultAuthzPolicyCanCreateCode(t *testing.T) { - myActorAddress := RandomAccountAddress(t) - otherAddress := RandomAccountAddress(t) + myActorAddress := keeper.RandomAccountAddress(t) + otherAddress := keeper.RandomAccountAddress(t) specs := map[string]struct { - chainConfigs ChainAccessConfigs + chainConfigs keeper.ChainAccessConfigs contractInstConf types.AccessConfig actor sdk.AccAddress exp bool panics bool }{ "upload nobody": { - chainConfigs: NewChainAccessConfigs(types.AllowNobody, types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AllowNobody, types.AllowEverybody), contractInstConf: types.AllowEverybody, exp: false, }, "upload everybody": { - chainConfigs: NewChainAccessConfigs(types.AllowEverybody, types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AllowEverybody, types.AllowEverybody), contractInstConf: types.AllowEverybody, exp: true, }, "upload only address - same": { - chainConfigs: NewChainAccessConfigs(types.AccessTypeOnlyAddress.With(myActorAddress), types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessTypeOnlyAddress.With(myActorAddress), types.AllowEverybody), contractInstConf: types.AllowEverybody, exp: true, }, "upload only address - different": { - chainConfigs: NewChainAccessConfigs(types.AccessTypeOnlyAddress.With(otherAddress), types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessTypeOnlyAddress.With(otherAddress), types.AllowEverybody), contractInstConf: types.AllowEverybody, exp: false, }, "upload any address - included": { - chainConfigs: NewChainAccessConfigs(types.AccessTypeAnyOfAddresses.With(otherAddress, myActorAddress), types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessTypeAnyOfAddresses.With(otherAddress, myActorAddress), types.AllowEverybody), contractInstConf: types.AllowEverybody, exp: true, }, "upload any address - not included": { - chainConfigs: NewChainAccessConfigs(types.AccessTypeAnyOfAddresses.With(otherAddress), types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessTypeAnyOfAddresses.With(otherAddress), types.AllowEverybody), contractInstConf: types.AllowEverybody, exp: false, }, "contract config - subtype": { - chainConfigs: NewChainAccessConfigs(types.AllowEverybody, types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AllowEverybody, types.AllowEverybody), contractInstConf: types.AccessTypeAnyOfAddresses.With(myActorAddress), exp: true, }, "contract config - not subtype": { - chainConfigs: NewChainAccessConfigs(types.AllowEverybody, types.AllowNobody), + chainConfigs: keeper.NewChainAccessConfigs(types.AllowEverybody, types.AllowNobody), contractInstConf: types.AllowEverybody, exp: false, }, "upload undefined config - panics": { - chainConfigs: NewChainAccessConfigs(types.AccessConfig{}, types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessConfig{}, types.AllowEverybody), contractInstConf: types.AllowEverybody, panics: true, }, } for name, spec := range specs { t.Run(name, func(t *testing.T) { - policy := DefaultAuthorizationPolicy{} + policy := keeper.DefaultAuthorizationPolicy{} if !spec.panics { got := policy.CanCreateCode(spec.chainConfigs, myActorAddress, spec.contractInstConf) assert.Equal(t, spec.exp, got) @@ -81,8 +82,8 @@ func TestDefaultAuthzPolicyCanCreateCode(t *testing.T) { } func TestDefaultAuthzPolicyCanInstantiateContract(t *testing.T) { - myActorAddress := RandomAccountAddress(t) - otherAddress := RandomAccountAddress(t) + myActorAddress := keeper.RandomAccountAddress(t) + otherAddress := keeper.RandomAccountAddress(t) specs := map[string]struct { config types.AccessConfig actor sdk.AccAddress @@ -120,7 +121,7 @@ func TestDefaultAuthzPolicyCanInstantiateContract(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - policy := DefaultAuthorizationPolicy{} + policy := keeper.DefaultAuthorizationPolicy{} if !spec.panics { got := policy.CanInstantiateContract(spec.config, myActorAddress) assert.Equal(t, spec.exp, got) @@ -134,8 +135,8 @@ func TestDefaultAuthzPolicyCanInstantiateContract(t *testing.T) { } func TestDefaultAuthzPolicyCanModifyContract(t *testing.T) { - myActorAddress := RandomAccountAddress(t) - otherAddress := RandomAccountAddress(t) + myActorAddress := keeper.RandomAccountAddress(t) + otherAddress := keeper.RandomAccountAddress(t) specs := map[string]struct { admin sdk.AccAddress @@ -155,7 +156,7 @@ func TestDefaultAuthzPolicyCanModifyContract(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - policy := DefaultAuthorizationPolicy{} + policy := keeper.DefaultAuthorizationPolicy{} got := policy.CanModifyContract(spec.admin, myActorAddress) assert.Equal(t, spec.exp, got) }) @@ -163,8 +164,8 @@ func TestDefaultAuthzPolicyCanModifyContract(t *testing.T) { } func TestDefaultAuthzPolicyCanModifyCodeAccessConfig(t *testing.T) { - myActorAddress := RandomAccountAddress(t) - otherAddress := RandomAccountAddress(t) + myActorAddress := keeper.RandomAccountAddress(t) + otherAddress := keeper.RandomAccountAddress(t) specs := map[string]struct { admin sdk.AccAddress @@ -191,7 +192,7 @@ func TestDefaultAuthzPolicyCanModifyCodeAccessConfig(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - policy := DefaultAuthorizationPolicy{} + policy := keeper.DefaultAuthorizationPolicy{} got := policy.CanModifyCodeAccessConfig(spec.admin, myActorAddress, spec.subset) assert.Equal(t, spec.exp, got) }) @@ -199,53 +200,53 @@ func TestDefaultAuthzPolicyCanModifyCodeAccessConfig(t *testing.T) { } func TestGovAuthzPolicyCanCreateCode(t *testing.T) { - myActorAddress := RandomAccountAddress(t) - otherAddress := RandomAccountAddress(t) + myActorAddress := keeper.RandomAccountAddress(t) + otherAddress := keeper.RandomAccountAddress(t) specs := map[string]struct { - chainConfigs ChainAccessConfigs + chainConfigs keeper.ChainAccessConfigs contractInstConf types.AccessConfig actor sdk.AccAddress }{ "upload nobody": { - chainConfigs: NewChainAccessConfigs(types.AllowNobody, types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AllowNobody, types.AllowEverybody), contractInstConf: types.AllowEverybody, }, "upload everybody": { - chainConfigs: NewChainAccessConfigs(types.AllowEverybody, types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AllowEverybody, types.AllowEverybody), contractInstConf: types.AllowEverybody, }, "upload only address - same": { - chainConfigs: NewChainAccessConfigs(types.AccessTypeOnlyAddress.With(myActorAddress), types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessTypeOnlyAddress.With(myActorAddress), types.AllowEverybody), contractInstConf: types.AllowEverybody, }, "upload only address - different": { - chainConfigs: NewChainAccessConfigs(types.AccessTypeOnlyAddress.With(otherAddress), types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessTypeOnlyAddress.With(otherAddress), types.AllowEverybody), contractInstConf: types.AllowEverybody, }, "upload any address - included": { - chainConfigs: NewChainAccessConfigs(types.AccessTypeAnyOfAddresses.With(otherAddress, myActorAddress), types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessTypeAnyOfAddresses.With(otherAddress, myActorAddress), types.AllowEverybody), contractInstConf: types.AllowEverybody, }, "upload any address - not included": { - chainConfigs: NewChainAccessConfigs(types.AccessTypeAnyOfAddresses.With(otherAddress), types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessTypeAnyOfAddresses.With(otherAddress), types.AllowEverybody), contractInstConf: types.AllowEverybody, }, "contract config - subtype": { - chainConfigs: NewChainAccessConfigs(types.AllowEverybody, types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AllowEverybody, types.AllowEverybody), contractInstConf: types.AccessTypeAnyOfAddresses.With(myActorAddress), }, "contract config - not subtype": { - chainConfigs: NewChainAccessConfigs(types.AllowEverybody, types.AllowNobody), + chainConfigs: keeper.NewChainAccessConfigs(types.AllowEverybody, types.AllowNobody), contractInstConf: types.AllowEverybody, }, "upload undefined config - not panics": { - chainConfigs: NewChainAccessConfigs(types.AccessConfig{}, types.AllowEverybody), + chainConfigs: keeper.NewChainAccessConfigs(types.AccessConfig{}, types.AllowEverybody), contractInstConf: types.AllowEverybody, }, } for name, spec := range specs { t.Run(name, func(t *testing.T) { - policy := GovAuthorizationPolicy{} + policy := keeper.GovAuthorizationPolicy{} got := policy.CanCreateCode(spec.chainConfigs, myActorAddress, spec.contractInstConf) assert.True(t, got) }) @@ -253,8 +254,8 @@ func TestGovAuthzPolicyCanCreateCode(t *testing.T) { } func TestGovAuthzPolicyCanInstantiateContract(t *testing.T) { - myActorAddress := RandomAccountAddress(t) - otherAddress := RandomAccountAddress(t) + myActorAddress := keeper.RandomAccountAddress(t) + otherAddress := keeper.RandomAccountAddress(t) specs := map[string]struct { config types.AccessConfig actor sdk.AccAddress @@ -283,7 +284,7 @@ func TestGovAuthzPolicyCanInstantiateContract(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - policy := GovAuthorizationPolicy{} + policy := keeper.GovAuthorizationPolicy{} got := policy.CanInstantiateContract(spec.config, myActorAddress) assert.True(t, got) }) @@ -291,8 +292,8 @@ func TestGovAuthzPolicyCanInstantiateContract(t *testing.T) { } func TestGovAuthzPolicyCanModifyContract(t *testing.T) { - myActorAddress := RandomAccountAddress(t) - otherAddress := RandomAccountAddress(t) + myActorAddress := keeper.RandomAccountAddress(t) + otherAddress := keeper.RandomAccountAddress(t) specs := map[string]struct { admin sdk.AccAddress @@ -307,7 +308,7 @@ func TestGovAuthzPolicyCanModifyContract(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - policy := GovAuthorizationPolicy{} + policy := keeper.GovAuthorizationPolicy{} got := policy.CanModifyContract(spec.admin, myActorAddress) assert.True(t, got) }) @@ -315,8 +316,8 @@ func TestGovAuthzPolicyCanModifyContract(t *testing.T) { } func TestGovAuthzPolicyCanModifyCodeAccessConfig(t *testing.T) { - myActorAddress := RandomAccountAddress(t) - otherAddress := RandomAccountAddress(t) + myActorAddress := keeper.RandomAccountAddress(t) + otherAddress := keeper.RandomAccountAddress(t) specs := map[string]struct { admin sdk.AccAddress @@ -337,7 +338,7 @@ func TestGovAuthzPolicyCanModifyCodeAccessConfig(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - policy := GovAuthorizationPolicy{} + policy := keeper.GovAuthorizationPolicy{} got := policy.CanModifyCodeAccessConfig(spec.admin, myActorAddress, spec.subset) assert.True(t, got) }) diff --git a/x/wasm/keeper/gas_register_test.go b/x/wasm/keeper/gas_register_test.go index 03f6cdd863..e033c6aef1 100644 --- a/x/wasm/keeper/gas_register_test.go +++ b/x/wasm/keeper/gas_register_test.go @@ -1,10 +1,11 @@ -package keeper +package keeper_test import ( "math" "strings" "testing" + "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/CosmWasm/wasmd/x/wasm/types" wasmvmtypes "github.com/CosmWasm/wasmvm/types" @@ -16,23 +17,23 @@ import ( func TestCompileCosts(t *testing.T) { specs := map[string]struct { srcLen int - srcConfig WasmGasRegisterConfig + srcConfig keeper.WasmGasRegisterConfig exp sdk.Gas expPanic bool }{ "one byte": { srcLen: 1, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), exp: sdk.Gas(3), // DefaultCompileCost }, "zero byte": { srcLen: 0, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), exp: sdk.Gas(0), }, "negative len": { srcLen: -1, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), expPanic: true, }, } @@ -40,11 +41,11 @@ func TestCompileCosts(t *testing.T) { t.Run(name, func(t *testing.T) { if spec.expPanic { assert.Panics(t, func() { - NewWasmGasRegister(spec.srcConfig).CompileCosts(spec.srcLen) + keeper.NewWasmGasRegister(spec.srcConfig).CompileCosts(spec.srcLen) }) return } - gotGas := NewWasmGasRegister(spec.srcConfig).CompileCosts(spec.srcLen) + gotGas := keeper.NewWasmGasRegister(spec.srcConfig).CompileCosts(spec.srcLen) assert.Equal(t, spec.exp, gotGas) }) } @@ -53,48 +54,48 @@ func TestCompileCosts(t *testing.T) { func TestNewContractInstanceCosts(t *testing.T) { specs := map[string]struct { srcLen int - srcConfig WasmGasRegisterConfig + srcConfig keeper.WasmGasRegisterConfig pinned bool exp sdk.Gas expPanic bool }{ "small msg - pinned": { srcLen: 1, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), pinned: true, - exp: DefaultContractMessageDataCost, + exp: keeper.DefaultContractMessageDataCost, }, "big msg - pinned": { srcLen: math.MaxUint32, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), pinned: true, - exp: DefaultContractMessageDataCost * sdk.Gas(math.MaxUint32), + exp: keeper.DefaultContractMessageDataCost * sdk.Gas(math.MaxUint32), }, "empty msg - pinned": { srcLen: 0, pinned: true, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), exp: sdk.Gas(0), }, "small msg - unpinned": { srcLen: 1, - srcConfig: DefaultGasRegisterConfig(), - exp: DefaultContractMessageDataCost + DefaultInstanceCost, + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultContractMessageDataCost + keeper.DefaultInstanceCost, }, "big msg - unpinned": { srcLen: math.MaxUint32, - srcConfig: DefaultGasRegisterConfig(), - exp: sdk.Gas(DefaultContractMessageDataCost*math.MaxUint32 + DefaultInstanceCost), + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultContractMessageDataCost*math.MaxUint32 + keeper.DefaultInstanceCost, }, "empty msg - unpinned": { srcLen: 0, - srcConfig: DefaultGasRegisterConfig(), - exp: sdk.Gas(DefaultInstanceCost), + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultInstanceCost, }, "negative len": { srcLen: -1, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), expPanic: true, }, } @@ -102,11 +103,11 @@ func TestNewContractInstanceCosts(t *testing.T) { t.Run(name, func(t *testing.T) { if spec.expPanic { assert.Panics(t, func() { - NewWasmGasRegister(spec.srcConfig).NewContractInstanceCosts(spec.pinned, spec.srcLen) + keeper.NewWasmGasRegister(spec.srcConfig).NewContractInstanceCosts(spec.pinned, spec.srcLen) }) return } - gotGas := NewWasmGasRegister(spec.srcConfig).NewContractInstanceCosts(spec.pinned, spec.srcLen) + gotGas := keeper.NewWasmGasRegister(spec.srcConfig).NewContractInstanceCosts(spec.pinned, spec.srcLen) assert.Equal(t, spec.exp, gotGas) }) } @@ -116,48 +117,48 @@ func TestContractInstanceCosts(t *testing.T) { // same as TestNewContractInstanceCosts currently specs := map[string]struct { srcLen int - srcConfig WasmGasRegisterConfig + srcConfig keeper.WasmGasRegisterConfig pinned bool exp sdk.Gas expPanic bool }{ "small msg - pinned": { srcLen: 1, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), pinned: true, - exp: DefaultContractMessageDataCost, + exp: keeper.DefaultContractMessageDataCost, }, "big msg - pinned": { srcLen: math.MaxUint32, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), pinned: true, - exp: sdk.Gas(DefaultContractMessageDataCost * math.MaxUint32), + exp: keeper.DefaultContractMessageDataCost * math.MaxUint32, }, "empty msg - pinned": { srcLen: 0, pinned: true, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), exp: sdk.Gas(0), }, "small msg - unpinned": { srcLen: 1, - srcConfig: DefaultGasRegisterConfig(), - exp: DefaultContractMessageDataCost + DefaultInstanceCost, + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultContractMessageDataCost + keeper.DefaultInstanceCost, }, "big msg - unpinned": { srcLen: math.MaxUint32, - srcConfig: DefaultGasRegisterConfig(), - exp: sdk.Gas(DefaultContractMessageDataCost*math.MaxUint32 + DefaultInstanceCost), + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultContractMessageDataCost*math.MaxUint32 + keeper.DefaultInstanceCost, }, "empty msg - unpinned": { srcLen: 0, - srcConfig: DefaultGasRegisterConfig(), - exp: sdk.Gas(DefaultInstanceCost), + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultInstanceCost, }, "negative len": { srcLen: -1, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), expPanic: true, }, } @@ -165,11 +166,11 @@ func TestContractInstanceCosts(t *testing.T) { t.Run(name, func(t *testing.T) { if spec.expPanic { assert.Panics(t, func() { - NewWasmGasRegister(spec.srcConfig).InstantiateContractCosts(spec.pinned, spec.srcLen) + keeper.NewWasmGasRegister(spec.srcConfig).InstantiateContractCosts(spec.pinned, spec.srcLen) }) return } - gotGas := NewWasmGasRegister(spec.srcConfig).InstantiateContractCosts(spec.pinned, spec.srcLen) + gotGas := keeper.NewWasmGasRegister(spec.srcConfig).InstantiateContractCosts(spec.pinned, spec.srcLen) assert.Equal(t, spec.exp, gotGas) }) } @@ -178,7 +179,7 @@ func TestContractInstanceCosts(t *testing.T) { func TestReplyCost(t *testing.T) { specs := map[string]struct { src wasmvmtypes.Reply - srcConfig WasmGasRegisterConfig + srcConfig keeper.WasmGasRegisterConfig pinned bool exp sdk.Gas expPanic bool @@ -194,9 +195,9 @@ func TestReplyCost(t *testing.T) { }, }, }, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), pinned: true, - exp: sdk.Gas(3*DefaultEventAttributeDataCost + DefaultPerAttributeCost + DefaultContractMessageDataCost), // 3 == len("foo") + exp: 3*keeper.DefaultEventAttributeDataCost + keeper.DefaultPerAttributeCost + keeper.DefaultContractMessageDataCost, // 3 == len("foo") }, "subcall response with events - pinned": { src: wasmvmtypes.Reply{ @@ -208,23 +209,23 @@ func TestReplyCost(t *testing.T) { }, }, }, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), pinned: true, - exp: sdk.Gas(3*DefaultEventAttributeDataCost + DefaultPerAttributeCost), // 3 == len("foo") + exp: 3*keeper.DefaultEventAttributeDataCost + keeper.DefaultPerAttributeCost, // 3 == len("foo") }, "subcall response with events exceeds free tier- pinned": { src: wasmvmtypes.Reply{ Result: wasmvmtypes.SubMsgResult{ Ok: &wasmvmtypes.SubMsgResponse{ Events: []wasmvmtypes.Event{ - {Type: "foo", Attributes: []wasmvmtypes.EventAttribute{{Key: strings.Repeat("x", DefaultEventAttributeDataFreeTier), Value: "myData"}}}, + {Type: "foo", Attributes: []wasmvmtypes.EventAttribute{{Key: strings.Repeat("x", keeper.DefaultEventAttributeDataFreeTier), Value: "myData"}}}, }, }, }, }, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), pinned: true, - exp: sdk.Gas((3+6)*DefaultEventAttributeDataCost + DefaultPerAttributeCost), // 3 == len("foo"), 6 == len("myData") + exp: (3+6)*keeper.DefaultEventAttributeDataCost + keeper.DefaultPerAttributeCost, // 3 == len("foo"), 6 == len("myData") }, "subcall response error - pinned": { src: wasmvmtypes.Reply{ @@ -232,9 +233,9 @@ func TestReplyCost(t *testing.T) { Err: "foo", }, }, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), pinned: true, - exp: 3 * DefaultContractMessageDataCost, + exp: 3 * keeper.DefaultContractMessageDataCost, }, "subcall response with events and data - unpinned": { src: wasmvmtypes.Reply{ @@ -247,8 +248,8 @@ func TestReplyCost(t *testing.T) { }, }, }, - srcConfig: DefaultGasRegisterConfig(), - exp: sdk.Gas(DefaultInstanceCost + 3*DefaultEventAttributeDataCost + DefaultPerAttributeCost + DefaultContractMessageDataCost), + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultInstanceCost + 3*keeper.DefaultEventAttributeDataCost + keeper.DefaultPerAttributeCost + keeper.DefaultContractMessageDataCost, }, "subcall response with events - unpinned": { src: wasmvmtypes.Reply{ @@ -260,21 +261,21 @@ func TestReplyCost(t *testing.T) { }, }, }, - srcConfig: DefaultGasRegisterConfig(), - exp: sdk.Gas(DefaultInstanceCost + 3*DefaultEventAttributeDataCost + DefaultPerAttributeCost), + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultInstanceCost + 3*keeper.DefaultEventAttributeDataCost + keeper.DefaultPerAttributeCost, }, "subcall response with events exceeds free tier- unpinned": { src: wasmvmtypes.Reply{ Result: wasmvmtypes.SubMsgResult{ Ok: &wasmvmtypes.SubMsgResponse{ Events: []wasmvmtypes.Event{ - {Type: "foo", Attributes: []wasmvmtypes.EventAttribute{{Key: strings.Repeat("x", DefaultEventAttributeDataFreeTier), Value: "myData"}}}, + {Type: "foo", Attributes: []wasmvmtypes.EventAttribute{{Key: strings.Repeat("x", keeper.DefaultEventAttributeDataFreeTier), Value: "myData"}}}, }, }, }, }, - srcConfig: DefaultGasRegisterConfig(), - exp: sdk.Gas(DefaultInstanceCost + (3+6)*DefaultEventAttributeDataCost + DefaultPerAttributeCost), // 3 == len("foo"), 6 == len("myData") + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultInstanceCost + (3+6)*keeper.DefaultEventAttributeDataCost + keeper.DefaultPerAttributeCost, // 3 == len("foo"), 6 == len("myData") }, "subcall response error - unpinned": { src: wasmvmtypes.Reply{ @@ -282,8 +283,8 @@ func TestReplyCost(t *testing.T) { Err: "foo", }, }, - srcConfig: DefaultGasRegisterConfig(), - exp: sdk.Gas(DefaultInstanceCost + 3*DefaultContractMessageDataCost), + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultInstanceCost + 3*keeper.DefaultContractMessageDataCost, }, "subcall response with empty events": { src: wasmvmtypes.Reply{ @@ -293,8 +294,8 @@ func TestReplyCost(t *testing.T) { }, }, }, - srcConfig: DefaultGasRegisterConfig(), - exp: DefaultInstanceCost, + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultInstanceCost, }, "subcall response with events unset": { src: wasmvmtypes.Reply{ @@ -302,19 +303,19 @@ func TestReplyCost(t *testing.T) { Ok: &wasmvmtypes.SubMsgResponse{}, }, }, - srcConfig: DefaultGasRegisterConfig(), - exp: DefaultInstanceCost, + srcConfig: keeper.DefaultGasRegisterConfig(), + exp: keeper.DefaultInstanceCost, }, } for name, spec := range specs { t.Run(name, func(t *testing.T) { if spec.expPanic { assert.Panics(t, func() { - NewWasmGasRegister(spec.srcConfig).ReplyCosts(spec.pinned, spec.src) + keeper.NewWasmGasRegister(spec.srcConfig).ReplyCosts(spec.pinned, spec.src) }) return } - gotGas := NewWasmGasRegister(spec.srcConfig).ReplyCosts(spec.pinned, spec.src) + gotGas := keeper.NewWasmGasRegister(spec.srcConfig).ReplyCosts(spec.pinned, spec.src) assert.Equal(t, spec.exp, gotGas) }) } @@ -329,11 +330,11 @@ func TestEventCosts(t *testing.T) { }{ "empty events": { srcEvents: make([]wasmvmtypes.Event, 1), - expGas: DefaultPerCustomEventCost, + expGas: keeper.DefaultPerCustomEventCost, }, "empty attributes": { srcAttrs: make([]wasmvmtypes.EventAttribute, 1), - expGas: DefaultPerAttributeCost, + expGas: keeper.DefaultPerAttributeCost, }, "both nil": { expGas: 0, @@ -341,7 +342,7 @@ func TestEventCosts(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - gotGas := NewDefaultWasmGasRegister().EventCosts(spec.srcAttrs, spec.srcEvents) + gotGas := keeper.NewDefaultWasmGasRegister().EventCosts(spec.srcAttrs, spec.srcEvents) assert.Equal(t, spec.expGas, gotGas) }) } @@ -350,24 +351,24 @@ func TestEventCosts(t *testing.T) { func TestToWasmVMGasConversion(t *testing.T) { specs := map[string]struct { src storetypes.Gas - srcConfig WasmGasRegisterConfig + srcConfig keeper.WasmGasRegisterConfig exp uint64 expPanic bool }{ "0": { src: 0, exp: 0, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), }, "max": { - srcConfig: WasmGasRegisterConfig{ + srcConfig: keeper.WasmGasRegisterConfig{ GasMultiplier: 1, }, src: math.MaxUint64, exp: math.MaxUint64, }, "overflow": { - srcConfig: WasmGasRegisterConfig{ + srcConfig: keeper.WasmGasRegisterConfig{ GasMultiplier: 2, }, src: math.MaxUint64, @@ -378,12 +379,12 @@ func TestToWasmVMGasConversion(t *testing.T) { t.Run(name, func(t *testing.T) { if spec.expPanic { assert.Panics(t, func() { - r := NewWasmGasRegister(spec.srcConfig) + r := keeper.NewWasmGasRegister(spec.srcConfig) _ = r.ToWasmVMGas(spec.src) }) return } - r := NewWasmGasRegister(spec.srcConfig) + r := keeper.NewWasmGasRegister(spec.srcConfig) got := r.ToWasmVMGas(spec.src) assert.Equal(t, spec.exp, got) }) @@ -394,23 +395,23 @@ func TestFromWasmVMGasConversion(t *testing.T) { specs := map[string]struct { src uint64 exp storetypes.Gas - srcConfig WasmGasRegisterConfig + srcConfig keeper.WasmGasRegisterConfig expPanic bool }{ "0": { src: 0, exp: 0, - srcConfig: DefaultGasRegisterConfig(), + srcConfig: keeper.DefaultGasRegisterConfig(), }, "max": { - srcConfig: WasmGasRegisterConfig{ + srcConfig: keeper.WasmGasRegisterConfig{ GasMultiplier: 1, }, src: math.MaxUint64, exp: math.MaxUint64, }, "missconfigured": { - srcConfig: WasmGasRegisterConfig{ + srcConfig: keeper.WasmGasRegisterConfig{ GasMultiplier: 0, }, src: 1, @@ -421,12 +422,12 @@ func TestFromWasmVMGasConversion(t *testing.T) { t.Run(name, func(t *testing.T) { if spec.expPanic { assert.Panics(t, func() { - r := NewWasmGasRegister(spec.srcConfig) + r := keeper.NewWasmGasRegister(spec.srcConfig) _ = r.FromWasmVMGas(spec.src) }) return } - r := NewWasmGasRegister(spec.srcConfig) + r := keeper.NewWasmGasRegister(spec.srcConfig) got := r.FromWasmVMGas(spec.src) assert.Equal(t, spec.exp, got) }) @@ -462,10 +463,10 @@ func TestUncompressCosts(t *testing.T) { for name, spec := range specs { t.Run(name, func(t *testing.T) { if spec.expPanic { - assert.Panics(t, func() { NewDefaultWasmGasRegister().UncompressCosts(spec.lenIn) }) + assert.Panics(t, func() { keeper.NewDefaultWasmGasRegister().UncompressCosts(spec.lenIn) }) return } - got := NewDefaultWasmGasRegister().UncompressCosts(spec.lenIn) + got := keeper.NewDefaultWasmGasRegister().UncompressCosts(spec.lenIn) assert.Equal(t, spec.exp, got) }) } diff --git a/x/wasm/keeper/genesis_test.go b/x/wasm/keeper/genesis_test.go index 063b2adc50..048df9c0f9 100644 --- a/x/wasm/keeper/genesis_test.go +++ b/x/wasm/keeper/genesis_test.go @@ -10,11 +10,12 @@ import ( "time" "github.com/cosmos/cosmos-sdk/store" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -26,7 +27,6 @@ import ( dbm "github.com/tendermint/tm-db" "github.com/CosmWasm/wasmd/x/wasm/types" - wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types" ) const firstCodeID = 1 @@ -64,22 +64,26 @@ func TestGenesisExportImport(t *testing.T) { codeID, _, err := contractKeeper.Create(srcCtx, creatorAddr, wasmCode, &codeInfo.InstantiateConfig) require.NoError(t, err) if pinned { - contractKeeper.PinCode(srcCtx, codeID) + err = contractKeeper.PinCode(srcCtx, codeID) + require.NoError(t, err) + } if contractExtension { anyTime := time.Now().UTC() - var nestedType govtypes.TextProposal + var nestedType govtypesv1beta1.TextProposal f.NilChance(0).Fuzz(&nestedType) - myExtension, err := govtypes.NewProposal(&nestedType, 1, anyTime, anyTime) + myExtension, err := govtypesv1beta1.NewProposal(&nestedType, 1, anyTime, anyTime) + require.NoError(t, err) + err = contract.SetExtension(&myExtension) require.NoError(t, err) - contract.SetExtension(&myExtension) } contract.CodeID = codeID contractAddr := wasmKeeper.ClassicAddressGenerator()(srcCtx, codeID, nil) wasmKeeper.storeContractInfo(srcCtx, contractAddr, &contract) wasmKeeper.appendToContractHistory(srcCtx, contractAddr, history...) - wasmKeeper.importContractState(srcCtx, contractAddr, stateModels) + err = wasmKeeper.importContractState(srcCtx, contractAddr, stateModels) + require.NoError(t, err) } var wasmParams types.Params f.NilChance(0).Fuzz(&wasmParams) @@ -104,7 +108,7 @@ func TestGenesisExportImport(t *testing.T) { dstKeeper, dstCtx, dstStoreKeys := setupKeeper(t) // reset contract code index in source DB for comparison with dest DB - wasmKeeper.IterateContractInfo(srcCtx, func(address sdk.AccAddress, info wasmTypes.ContractInfo) bool { + wasmKeeper.IterateContractInfo(srcCtx, func(address sdk.AccAddress, info types.ContractInfo) bool { creatorAddress := sdk.MustAccAddressFromBech32(info.Creator) history := wasmKeeper.GetContractHistory(srcCtx, address) @@ -114,10 +118,11 @@ func TestGenesisExportImport(t *testing.T) { }) // re-import - var importState wasmTypes.GenesisState + var importState types.GenesisState err = dstKeeper.cdc.UnmarshalJSON(exportedGenesis, &importState) require.NoError(t, err) - InitGenesis(dstCtx, dstKeeper, importState) + _, err = InitGenesis(dstCtx, dstKeeper, importState) + require.NoError(t, err) // compare whole DB for j := range srcStoreKeys { @@ -143,7 +148,7 @@ func TestGenesisInit(t *testing.T) { wasmCode, err := os.ReadFile("./testdata/hackatom.wasm") require.NoError(t, err) - myCodeInfo := wasmTypes.CodeInfoFixture(wasmTypes.WithSHA256CodeHash(wasmCode)) + myCodeInfo := types.CodeInfoFixture(types.WithSHA256CodeHash(wasmCode)) specs := map[string]struct { src types.GenesisState expSuccess bool @@ -205,7 +210,7 @@ func TestGenesisInit(t *testing.T) { "prevent code hash mismatch": {src: types.GenesisState{ Codes: []types.Code{{ CodeID: firstCodeID, - CodeInfo: wasmTypes.CodeInfoFixture(func(i *wasmTypes.CodeInfo) { i.CodeHash = make([]byte, sha256.Size) }), + CodeInfo: types.CodeInfoFixture(func(i *types.CodeInfo) { i.CodeHash = make([]byte, sha256.Size) }), CodeBytes: wasmCode, }}, Params: types.DefaultParams(), @@ -254,7 +259,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractInfo: types.ContractInfoFixture(func(c *types.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), ContractCodeHistory: []types.ContractCodeHistoryEntry{ { Operation: types.ContractCodeHistoryOperationTypeMigrate, @@ -283,7 +288,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractInfo: types.ContractInfoFixture(func(c *types.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), ContractCodeHistory: []types.ContractCodeHistoryEntry{ { Operation: types.ContractCodeHistoryOperationTypeMigrate, @@ -294,7 +299,7 @@ func TestGenesisInit(t *testing.T) { }, }, { ContractAddress: BuildContractAddressClassic(1, 2).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractInfo: types.ContractInfoFixture(func(c *types.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), ContractCodeHistory: []types.ContractCodeHistoryEntry{ { Operation: types.ContractCodeHistoryOperationTypeMigrate, @@ -318,7 +323,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractInfo: types.ContractInfoFixture(func(c *types.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), ContractCodeHistory: []types.ContractCodeHistoryEntry{ { Operation: types.ContractCodeHistoryOperationTypeMigrate, @@ -342,7 +347,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractInfo: types.ContractInfoFixture(func(c *types.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), ContractCodeHistory: []types.ContractCodeHistoryEntry{ { Operation: types.ContractCodeHistoryOperationTypeMigrate, @@ -353,7 +358,7 @@ func TestGenesisInit(t *testing.T) { }, }, { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractInfo: types.ContractInfoFixture(func(c *types.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), ContractCodeHistory: []types.ContractCodeHistoryEntry{ { Operation: types.ContractCodeHistoryOperationTypeMigrate, @@ -377,7 +382,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractInfo: types.ContractInfoFixture(func(c *types.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), ContractState: []types.Model{ { Key: []byte{0x1}, @@ -433,7 +438,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractInfo: types.ContractInfoFixture(func(c *types.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), ContractCodeHistory: []types.ContractCodeHistoryEntry{ { Operation: types.ContractCodeHistoryOperationTypeMigrate, @@ -543,7 +548,7 @@ func TestImportContractWithCodeHistoryPreserved(t *testing.T) { enc64 := base64.StdEncoding.EncodeToString genesisStr := fmt.Sprintf(genesisTemplate, enc64(wasmCodeHash[:]), enc64(wasmCode)) - var importState wasmTypes.GenesisState + var importState types.GenesisState err = keeper.cdc.UnmarshalJSON([]byte(genesisStr), &importState) require.NoError(t, err) require.NoError(t, importState.ValidateBasic(), genesisStr) @@ -566,7 +571,7 @@ func TestImportContractWithCodeHistoryPreserved(t *testing.T) { expCodeInfo := types.CodeInfo{ CodeHash: wasmCodeHash[:], Creator: codeCreatorAddr, - InstantiateConfig: wasmTypes.AccessConfig{ + InstantiateConfig: types.AccessConfig{ Permission: types.AccessTypeOnlyAddress, Address: codeCreatorAddr, }, @@ -614,7 +619,7 @@ func TestImportContractWithCodeHistoryPreserved(t *testing.T) { assert.Equal(t, uint64(3), keeper.PeekAutoIncrementID(ctx, types.KeyLastInstanceID)) } -func setupKeeper(t *testing.T) (*Keeper, sdk.Context, []sdk.StoreKey) { +func setupKeeper(t *testing.T) (*Keeper, sdk.Context, []storetypes.StoreKey) { t.Helper() tempDir, err := os.MkdirTemp("", "wasm") require.NoError(t, err) @@ -622,14 +627,14 @@ func setupKeeper(t *testing.T) (*Keeper, sdk.Context, []sdk.StoreKey) { var ( keyParams = sdk.NewKVStoreKey(paramtypes.StoreKey) tkeyParams = sdk.NewTransientStoreKey(paramtypes.TStoreKey) - keyWasm = sdk.NewKVStoreKey(wasmTypes.StoreKey) + keyWasm = sdk.NewKVStoreKey(types.StoreKey) ) db := dbm.NewMemDB() ms := store.NewCommitMultiStore(db) - ms.MountStoreWithDB(keyWasm, sdk.StoreTypeIAVL, db) - ms.MountStoreWithDB(keyParams, sdk.StoreTypeIAVL, db) - ms.MountStoreWithDB(tkeyParams, sdk.StoreTypeTransient, db) + ms.MountStoreWithDB(keyWasm, storetypes.StoreTypeIAVL, db) + ms.MountStoreWithDB(keyParams, storetypes.StoreTypeIAVL, db) + ms.MountStoreWithDB(tkeyParams, storetypes.StoreTypeTransient, db) require.NoError(t, ms.LoadLatestVersion()) ctx := sdk.NewContext(ms, tmproto.Header{ @@ -641,31 +646,14 @@ func setupKeeper(t *testing.T) (*Keeper, sdk.Context, []sdk.StoreKey) { // register an example extension. must be protobuf encodingConfig.InterfaceRegistry.RegisterImplementations( (*types.ContractInfoExtension)(nil), - &govtypes.Proposal{}, + &govtypesv1beta1.Proposal{}, ) // also registering gov interfaces for nested Any type - govtypes.RegisterInterfaces(encodingConfig.InterfaceRegistry) + govtypesv1beta1.RegisterInterfaces(encodingConfig.InterfaceRegistry) - wasmConfig := wasmTypes.DefaultWasmConfig() + wasmConfig := types.DefaultWasmConfig() pk := paramskeeper.NewKeeper(encodingConfig.Marshaler, encodingConfig.Amino, keyParams, tkeyParams) - srcKeeper := NewKeeper( - encodingConfig.Marshaler, - keyWasm, - pk.Subspace(wasmTypes.ModuleName), - authkeeper.AccountKeeper{}, - &bankkeeper.BaseKeeper{}, - stakingkeeper.Keeper{}, - distributionkeeper.Keeper{}, - nil, - nil, - nil, - nil, - nil, - nil, - tempDir, - wasmConfig, - AvailableCapabilities, - ) - return &srcKeeper, ctx, []sdk.StoreKey{keyWasm, keyParams} + srcKeeper := NewKeeper(encodingConfig.Marshaler, keyWasm, pk.Subspace(types.ModuleName), authkeeper.AccountKeeper{}, bankkeeper.BaseKeeper{}, stakingkeeper.Keeper{}, distributionkeeper.Keeper{}, nil, nil, nil, nil, nil, nil, tempDir, wasmConfig, AvailableCapabilities) + return &srcKeeper, ctx, []storetypes.StoreKey{keyWasm, keyParams} } diff --git a/x/wasm/keeper/handler_plugin.go b/x/wasm/keeper/handler_plugin.go index bff3550eaa..a2ded12174 100644 --- a/x/wasm/keeper/handler_plugin.go +++ b/x/wasm/keeper/handler_plugin.go @@ -9,8 +9,8 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v6/modules/core/24-host" "github.com/CosmWasm/wasmd/x/wasm/types" ) @@ -163,33 +163,20 @@ func (h IBCRawPacketHandler) DispatchMsg(ctx sdk.Context, _ sdk.AccAddress, cont return nil, nil, sdkerrors.Wrapf(types.ErrEmpty, "ibc channel") } - sequence, found := h.channelKeeper.GetNextSequenceSend(ctx, contractIBCPortID, contractIBCChannelID) + _, found := h.channelKeeper.GetNextSequenceSend(ctx, contractIBCPortID, contractIBCChannelID) if !found { return nil, nil, sdkerrors.Wrapf(channeltypes.ErrSequenceSendNotFound, "source port: %s, source channel: %s", contractIBCPortID, contractIBCChannelID, ) } - channelInfo, ok := h.channelKeeper.GetChannel(ctx, contractIBCPortID, contractIBCChannelID) - if !ok { - return nil, nil, sdkerrors.Wrap(channeltypes.ErrInvalidChannel, "not found") - } channelCap, ok := h.capabilityKeeper.GetCapability(ctx, host.ChannelCapabilityPath(contractIBCPortID, contractIBCChannelID)) if !ok { return nil, nil, sdkerrors.Wrap(channeltypes.ErrChannelCapabilityNotFound, "module does not own channel capability") } - packet := channeltypes.NewPacket( - msg.IBC.SendPacket.Data, - sequence, - contractIBCPortID, - contractIBCChannelID, - channelInfo.Counterparty.PortId, - channelInfo.Counterparty.ChannelId, - ConvertWasmIBCTimeoutHeightToCosmosHeight(msg.IBC.SendPacket.Timeout.Block), - msg.IBC.SendPacket.Timeout.Timestamp, - ) - if err := h.channelKeeper.SendPacket(ctx, channelCap, packet); err != nil { + sequence, err := h.channelKeeper.SendPacket(ctx, channelCap, contractIBCPortID, contractIBCChannelID, ConvertWasmIBCTimeoutHeightToCosmosHeight(msg.IBC.SendPacket.Timeout.Block), msg.IBC.SendPacket.Timeout.Timestamp, msg.IBC.SendPacket.Data) + if err != nil { return nil, nil, sdkerrors.Wrap(err, "failed to send packet") } diff --git a/x/wasm/keeper/handler_plugin_encoders.go b/x/wasm/keeper/handler_plugin_encoders.go index d41d8f1012..a3f7aeaee0 100644 --- a/x/wasm/keeper/handler_plugin_encoders.go +++ b/x/wasm/keeper/handler_plugin_encoders.go @@ -10,11 +10,11 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" "github.com/CosmWasm/wasmd/x/wasm/types" ) @@ -318,10 +318,10 @@ func EncodeGovMsg(sender sdk.AccAddress, msg *wasmvmtypes.GovMsg) ([]sdk.Msg, er if err != nil { return nil, sdkerrors.Wrap(err, "vote option") } - m := govtypes.NewMsgVote(sender, msg.Vote.ProposalId, voteOption) + m := govv1.NewMsgVote(sender, msg.Vote.ProposalId, voteOption, "") return []sdk.Msg{m}, nil case msg.VoteWeighted != nil: - opts := make([]govtypes.WeightedVoteOption, len(msg.VoteWeighted.Options)) + opts := govv1.WeightedVoteOptions{} for i, v := range msg.VoteWeighted.Options { weight, err := sdk.NewDecFromStr(v.Weight) if err != nil { @@ -331,9 +331,9 @@ func EncodeGovMsg(sender sdk.AccAddress, msg *wasmvmtypes.GovMsg) ([]sdk.Msg, er if err != nil { return nil, sdkerrors.Wrap(err, "vote option") } - opts[i] = govtypes.WeightedVoteOption{Option: voteOption, Weight: weight} + opts = append(opts, &govv1.WeightedVoteOption{Option: voteOption, Weight: weight.String()}) } - m := govtypes.NewMsgVoteWeighted(sender, msg.VoteWeighted.ProposalId, opts) + m := govv1.NewMsgVoteWeighted(sender, msg.VoteWeighted.ProposalId, opts, "") return []sdk.Msg{m}, nil default: @@ -341,19 +341,19 @@ func EncodeGovMsg(sender sdk.AccAddress, msg *wasmvmtypes.GovMsg) ([]sdk.Msg, er } } -func convertVoteOption(s interface{}) (govtypes.VoteOption, error) { - var option govtypes.VoteOption +func convertVoteOption(s interface{}) (govv1.VoteOption, error) { + var option govv1.VoteOption switch s { case wasmvmtypes.Yes: - option = govtypes.OptionYes + option = govv1.OptionYes case wasmvmtypes.No: - option = govtypes.OptionNo + option = govv1.OptionNo case wasmvmtypes.NoWithVeto: - option = govtypes.OptionNoWithVeto + option = govv1.OptionNoWithVeto case wasmvmtypes.Abstain: - option = govtypes.OptionAbstain + option = govv1.OptionAbstain default: - return govtypes.OptionEmpty, types.ErrInvalid + return govv1.OptionEmpty, types.ErrInvalid } return option, nil } diff --git a/x/wasm/keeper/handler_plugin_encoders_test.go b/x/wasm/keeper/handler_plugin_encoders_test.go index 60b66fbc0d..cddd56bb1b 100644 --- a/x/wasm/keeper/handler_plugin_encoders_test.go +++ b/x/wasm/keeper/handler_plugin_encoders_test.go @@ -4,11 +4,14 @@ import ( "testing" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - "github.com/golang/protobuf/proto" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + + "github.com/golang/protobuf/proto" //nolint:staticcheck // SA1019: proto is deprecated "github.com/stretchr/testify/assert" wasmvmtypes "github.com/CosmWasm/wasmvm/types" @@ -303,7 +306,8 @@ func TestEncoding(t *testing.T) { }, }, }, - expError: false, // fails in the handler + expError: false, // fails in the handler + expInvalid: true, output: []sdk.Msg{ &stakingtypes.MsgDelegate{ DelegatorAddress: addr1.String(), @@ -542,10 +546,10 @@ func TestEncoding(t *testing.T) { if tc.expError { assert.Error(t, err) return - } else { - require.NoError(t, err) - assert.Equal(t, tc.output, res) } + require.NoError(t, err) + assert.Equal(t, tc.output, res) + // and valid sdk message for _, v := range res { gotErr := v.ValidateBasic() @@ -581,10 +585,10 @@ func TestEncodeGovMsg(t *testing.T) { }, }, output: []sdk.Msg{ - &govtypes.MsgVote{ + &govv1.MsgVote{ ProposalId: 1, Voter: myAddr.String(), - Option: govtypes.OptionYes, + Option: govv1.OptionYes, }, }, }, @@ -596,10 +600,10 @@ func TestEncodeGovMsg(t *testing.T) { }, }, output: []sdk.Msg{ - &govtypes.MsgVote{ + &govv1.MsgVote{ ProposalId: 1, Voter: myAddr.String(), - Option: govtypes.OptionNo, + Option: govv1.OptionNo, }, }, }, @@ -611,10 +615,10 @@ func TestEncodeGovMsg(t *testing.T) { }, }, output: []sdk.Msg{ - &govtypes.MsgVote{ + &govv1.MsgVote{ ProposalId: 10, Voter: myAddr.String(), - Option: govtypes.OptionAbstain, + Option: govv1.OptionAbstain, }, }, }, @@ -626,10 +630,10 @@ func TestEncodeGovMsg(t *testing.T) { }, }, output: []sdk.Msg{ - &govtypes.MsgVote{ + &govv1.MsgVote{ ProposalId: 1, Voter: myAddr.String(), - Option: govtypes.OptionNoWithVeto, + Option: govv1.OptionNoWithVeto, }, }, }, @@ -655,11 +659,11 @@ func TestEncodeGovMsg(t *testing.T) { }, }, output: []sdk.Msg{ - &govtypes.MsgVoteWeighted{ + &govv1.MsgVoteWeighted{ ProposalId: 1, Voter: myAddr.String(), - Options: []govtypes.WeightedVoteOption{ - {Option: govtypes.OptionYes, Weight: sdk.NewDec(1)}, + Options: []*govv1.WeightedVoteOption{ + {Option: govv1.OptionYes, Weight: sdk.NewDec(1).String()}, }, }, }, @@ -680,14 +684,14 @@ func TestEncodeGovMsg(t *testing.T) { }, }, output: []sdk.Msg{ - &govtypes.MsgVoteWeighted{ + &govv1.MsgVoteWeighted{ ProposalId: 1, Voter: myAddr.String(), - Options: []govtypes.WeightedVoteOption{ - {Option: govtypes.OptionYes, Weight: sdk.NewDecWithPrec(23, 2)}, - {Option: govtypes.OptionNo, Weight: sdk.NewDecWithPrec(24, 2)}, - {Option: govtypes.OptionAbstain, Weight: sdk.NewDecWithPrec(26, 2)}, - {Option: govtypes.OptionNoWithVeto, Weight: sdk.NewDecWithPrec(27, 2)}, + Options: []*govv1.WeightedVoteOption{ + {Option: govv1.OptionYes, Weight: sdk.NewDecWithPrec(23, 2).String()}, + {Option: govv1.OptionNo, Weight: sdk.NewDecWithPrec(24, 2).String()}, + {Option: govv1.OptionAbstain, Weight: sdk.NewDecWithPrec(26, 2).String()}, + {Option: govv1.OptionNoWithVeto, Weight: sdk.NewDecWithPrec(27, 2).String()}, }, }, }, @@ -706,12 +710,12 @@ func TestEncodeGovMsg(t *testing.T) { }, }, output: []sdk.Msg{ - &govtypes.MsgVoteWeighted{ + &govv1.MsgVoteWeighted{ ProposalId: 1, Voter: myAddr.String(), - Options: []govtypes.WeightedVoteOption{ - {Option: govtypes.OptionYes, Weight: sdk.NewDecWithPrec(5, 1)}, - {Option: govtypes.OptionYes, Weight: sdk.NewDecWithPrec(5, 1)}, + Options: []*govv1.WeightedVoteOption{ + {Option: govv1.OptionYes, Weight: sdk.NewDecWithPrec(5, 1).String()}, + {Option: govv1.OptionYes, Weight: sdk.NewDecWithPrec(5, 1).String()}, }, }, }, @@ -731,12 +735,12 @@ func TestEncodeGovMsg(t *testing.T) { }, }, output: []sdk.Msg{ - &govtypes.MsgVoteWeighted{ + &govv1.MsgVoteWeighted{ ProposalId: 1, Voter: myAddr.String(), - Options: []govtypes.WeightedVoteOption{ - {Option: govtypes.OptionYes, Weight: sdk.NewDecWithPrec(51, 2)}, - {Option: govtypes.OptionNo, Weight: sdk.NewDecWithPrec(5, 1)}, + Options: []*govv1.WeightedVoteOption{ + {Option: govv1.OptionYes, Weight: sdk.NewDecWithPrec(51, 2).String()}, + {Option: govv1.OptionNo, Weight: sdk.NewDecWithPrec(5, 1).String()}, }, }, }, @@ -756,12 +760,12 @@ func TestEncodeGovMsg(t *testing.T) { }, }, output: []sdk.Msg{ - &govtypes.MsgVoteWeighted{ + &govv1.MsgVoteWeighted{ ProposalId: 1, Voter: myAddr.String(), - Options: []govtypes.WeightedVoteOption{ - {Option: govtypes.OptionYes, Weight: sdk.NewDecWithPrec(49, 2)}, - {Option: govtypes.OptionNo, Weight: sdk.NewDecWithPrec(5, 1)}, + Options: []*govv1.WeightedVoteOption{ + {Option: govv1.OptionYes, Weight: sdk.NewDecWithPrec(49, 2).String()}, + {Option: govv1.OptionNo, Weight: sdk.NewDecWithPrec(5, 1).String()}, }, }, }, @@ -777,10 +781,10 @@ func TestEncodeGovMsg(t *testing.T) { if tc.expError { assert.Error(t, gotEncErr) return - } else { - require.NoError(t, gotEncErr) - assert.Equal(t, tc.output, res) } + require.NoError(t, gotEncErr) + assert.Equal(t, tc.output, res) + // and valid sdk message for _, v := range res { gotErr := v.ValidateBasic() diff --git a/x/wasm/keeper/handler_plugin_test.go b/x/wasm/keeper/handler_plugin_test.go index ffa63b692d..6112da288b 100644 --- a/x/wasm/keeper/handler_plugin_test.go +++ b/x/wasm/keeper/handler_plugin_test.go @@ -11,9 +11,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v4/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -239,11 +239,20 @@ func TestIBCRawPacketHandler(t *testing.T) { ), }, true }, - SendPacketFn: func(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error { - capturedPacket = packet - return nil + + SendPacketFn: func(ctx sdk.Context, channelCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (uint64, error) { + capturedPacket = channeltypes.Packet{ + Sequence: 1, + SourcePort: sourcePort, + SourceChannel: sourceChannel, + TimeoutHeight: timeoutHeight, + TimeoutTimestamp: timeoutTimestamp, + Data: data, + } + return 1, nil }, } + capKeeper := &wasmtesting.MockCapabilityKeeper{ GetCapabilityFn: func(ctx sdk.Context, name string) (*capabilitytypes.Capability, bool) { return &capabilitytypes.Capability{}, true @@ -266,13 +275,11 @@ func TestIBCRawPacketHandler(t *testing.T) { chanKeeper: chanKeeper, capKeeper: capKeeper, expPacketSent: channeltypes.Packet{ - Sequence: 1, - SourcePort: ibcPort, - SourceChannel: "channel-1", - DestinationPort: "other-port", - DestinationChannel: "other-channel-1", - Data: []byte("myData"), - TimeoutHeight: clienttypes.Height{RevisionNumber: 1, RevisionHeight: 2}, + Sequence: 1, + SourcePort: ibcPort, + SourceChannel: "channel-1", + Data: []byte("myData"), + TimeoutHeight: clienttypes.Height{RevisionNumber: 1, RevisionHeight: 2}, }, }, "sequence not found returns error": { @@ -286,6 +293,13 @@ func TestIBCRawPacketHandler(t *testing.T) { return 0, false }, }, + + capKeeper: wasmtesting.MockCapabilityKeeper{ + GetCapabilityFn: func(ctx sdk.Context, name string) (*capabilitytypes.Capability, bool) { + return nil, false + }, + }, + expErr: channeltypes.ErrSequenceSendNotFound, }, "capability not found returns error": { @@ -409,7 +423,7 @@ func TestBurnCoinMessageHandlerIntegration(t *testing.T) { // and total supply reduced by burned amount after, err := keepers.BankKeeper.TotalSupply(sdk.WrapSDKContext(ctx), &banktypes.QueryTotalSupplyRequest{}) require.NoError(t, err) - diff := before.Supply.Sub(after.Supply) + diff := before.Supply.Sub(after.Supply...) assert.Equal(t, sdk.NewCoins(sdk.NewCoin("denom", sdk.NewInt(100))), diff) }) } diff --git a/x/wasm/keeper/ibc.go b/x/wasm/keeper/ibc.go index 3857b5f272..dc87617fe7 100644 --- a/x/wasm/keeper/ibc.go +++ b/x/wasm/keeper/ibc.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" + host "github.com/cosmos/ibc-go/v6/modules/core/24-host" "github.com/CosmWasm/wasmd/x/wasm/types" ) diff --git a/x/wasm/keeper/keeper.go b/x/wasm/keeper/keeper.go index 16a248e568..f89e04384a 100644 --- a/x/wasm/keeper/keeper.go +++ b/x/wasm/keeper/keeper.go @@ -16,6 +16,7 @@ import ( wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -84,7 +85,7 @@ var defaultAcceptedAccountTypes = map[reflect.Type]struct{}{ // Keeper will have a reference to Wasmer with it's own data directory. type Keeper struct { - storeKey sdk.StoreKey + storeKey storetypes.StoreKey cdc codec.Codec accountKeeper types.AccountKeeper bank CoinTransferrer @@ -975,9 +976,10 @@ func (k Keeper) runtimeGasForContract(ctx sdk.Context) uint64 { if meter.IsOutOfGas() { return 0 } - if meter.Limit() == 0 { // infinite gas meter with limit=0 and not out of gas + if meter.Limit() == math.MaxUint64 { // infinite gas meter with limit=math.MaxUint64 and not out of gas return math.MaxUint64 } + return k.gasRegister.ToWasmVMGas(meter.Limit() - meter.GasConsumedToLimit()) } diff --git a/x/wasm/keeper/keeper_cgo.go b/x/wasm/keeper/keeper_cgo.go index 06a0ccabe6..e733eb2f65 100644 --- a/x/wasm/keeper/keeper_cgo.go +++ b/x/wasm/keeper/keeper_cgo.go @@ -7,7 +7,7 @@ import ( wasmvm "github.com/CosmWasm/wasmvm" "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/CosmWasm/wasmd/x/wasm/types" @@ -17,7 +17,7 @@ import ( // If customEncoders is non-nil, we can use this to override some of the message handler, especially custom func NewKeeper( cdc codec.Codec, - storeKey sdk.StoreKey, + storeKey storetypes.StoreKey, paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, @@ -59,7 +59,7 @@ func NewKeeper( maxQueryStackSize: types.DefaultMaxQueryStackSize, acceptedAccountTypes: defaultAcceptedAccountTypes, } - keeper.wasmVMQueryHandler = DefaultQueryPlugins(bankKeeper, stakingKeeper, distKeeper, channelKeeper, keeper) + keeper.wasmVMQueryHandler = DefaultQueryPlugins(bankKeeper, stakingKeeper, distKeeper, channelKeeper, queryRouter, keeper) for _, o := range opts { o.apply(keeper) } diff --git a/x/wasm/keeper/keeper_test.go b/x/wasm/keeper/keeper_test.go index bee350b3c1..38f7b2497f 100644 --- a/x/wasm/keeper/keeper_test.go +++ b/x/wasm/keeper/keeper_test.go @@ -412,7 +412,7 @@ func TestInstantiate(t *testing.T) { gasAfter := ctx.GasMeter().GasConsumed() if types.EnableGasVerification { - require.Equal(t, uint64(0x1a7b6), gasAfter-gasBefore) + require.Equal(t, uint64(0x1b5bc), gasAfter-gasBefore) } // ensure it is stored properly @@ -540,7 +540,9 @@ func TestInstantiateWithPermissions(t *testing.T) { t.Run(msg, func(t *testing.T) { ctx, keepers := CreateTestInput(t, false, AvailableCapabilities) accKeeper, bankKeeper, keeper := keepers.AccountKeeper, keepers.BankKeeper, keepers.ContractKeeper - fundAccounts(t, ctx, accKeeper, bankKeeper, spec.srcActor, deposit) + if spec.srcActor != nil { + fundAccounts(t, ctx, accKeeper, bankKeeper, spec.srcActor, deposit) + } contractID, _, err := keeper.Create(ctx, myAddr, hackatomWasm, &spec.srcPermission) require.NoError(t, err) @@ -838,7 +840,7 @@ func TestExecute(t *testing.T) { // unauthorized - trialCtx so we don't change state trialCtx := ctx.WithMultiStore(ctx.MultiStore().CacheWrap().(sdk.MultiStore)) - res, err := keepers.ContractKeeper.Execute(trialCtx, addr, creator, []byte(`{"release":{}}`), nil) + _, err = keepers.ContractKeeper.Execute(trialCtx, addr, creator, []byte(`{"release":{}}`), nil) require.Error(t, err) require.True(t, errors.Is(err, types.ErrExecuteFailed)) require.Equal(t, "Unauthorized: execute wasm contract failed", err.Error()) @@ -848,15 +850,15 @@ func TestExecute(t *testing.T) { gasBefore := ctx.GasMeter().GasConsumed() em := sdk.NewEventManager() // when - res, err = keepers.ContractKeeper.Execute(ctx.WithEventManager(em), addr, fred, []byte(`{"release":{}}`), topUp) - diff := time.Now().Sub(start) + res, err := keepers.ContractKeeper.Execute(ctx.WithEventManager(em), addr, fred, []byte(`{"release":{}}`), topUp) + diff := time.Since(start) require.NoError(t, err) require.NotNil(t, res) // make sure gas is properly deducted from ctx gasAfter := ctx.GasMeter().GasConsumed() if types.EnableGasVerification { - require.Equal(t, uint64(0x17d7f), gasAfter-gasBefore) + require.Equal(t, uint64(0x1a250), gasAfter-gasBefore) } // ensure bob now exists and got both payments released bobAcct = accKeeper.GetAccount(ctx, bob) @@ -995,7 +997,7 @@ func TestExecuteWithPanic(t *testing.T) { contractID, _, err := keeper.Create(ctx, creator, hackatomWasm, nil) require.NoError(t, err) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: fred, Beneficiary: bob, @@ -1027,7 +1029,7 @@ func TestExecuteWithCpuLoop(t *testing.T) { contractID, _, err := keeper.Create(ctx, creator, hackatomWasm, nil) require.NoError(t, err) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: fred, Beneficiary: bob, @@ -1053,6 +1055,7 @@ func TestExecuteWithCpuLoop(t *testing.T) { // this should throw out of gas exception (panic) _, err = keepers.ContractKeeper.Execute(ctx, addr, fred, []byte(`{"cpu_loop":{}}`), nil) + require.Error(t, err) require.True(t, false, "We must panic before this line") } @@ -1069,7 +1072,7 @@ func TestExecuteWithStorageLoop(t *testing.T) { contractID, _, err := keeper.Create(ctx, creator, hackatomWasm, nil) require.NoError(t, err) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: fred, Beneficiary: bob, @@ -1095,6 +1098,7 @@ func TestExecuteWithStorageLoop(t *testing.T) { // this should throw out of gas exception (panic) _, err = keepers.ContractKeeper.Execute(ctx, addr, fred, []byte(`{"storage_loop":{}}`), nil) + require.Error(t, err) require.True(t, false, "We must panic before this line") } @@ -1349,7 +1353,7 @@ func TestMigrateWithDispatchedMessage(t *testing.T) { require.NoError(t, err) require.NotEqual(t, originalContractID, burnerContractID) - _, _, myPayoutAddr := keyPubAddr() + _, _, myPayoutAddr := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: fred, Beneficiary: fred, @@ -1513,8 +1517,8 @@ func TestSudo(t *testing.T) { contractID, _, err := keeper.Create(ctx, creator, hackatomWasm, nil) require.NoError(t, err) - _, _, bob := keyPubAddr() - _, _, fred := keyPubAddr() + _, _, bob := KeyPubAddr() + _, _, fred := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: fred, Beneficiary: bob, @@ -1526,7 +1530,7 @@ func TestSudo(t *testing.T) { require.Equal(t, "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", addr.String()) // the community is broke - _, _, community := keyPubAddr() + _, _, community := KeyPubAddr() comAcct := accKeeper.GetAccount(ctx, community) require.Nil(t, comAcct) @@ -1599,7 +1603,7 @@ func TestUpdateContractAdmin(t *testing.T) { originalContractID, _, err := keeper.Create(parentCtx, creator, hackatomWasm, nil) require.NoError(t, err) - _, _, anyAddr := keyPubAddr() + _, _, anyAddr := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: fred, Beneficiary: anyAddr, @@ -1669,7 +1673,7 @@ func TestClearContractAdmin(t *testing.T) { originalContractID, _, err := keeper.Create(parentCtx, creator, hackatomWasm, nil) require.NoError(t, err) - _, _, anyAddr := keyPubAddr() + _, _, anyAddr := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: fred, Beneficiary: anyAddr, @@ -2277,6 +2281,8 @@ func TestIteratorContractByCreator(t *testing.T) { mockAddress3 := keepers.Faucet.NewFundedRandomAccount(parentCtx, topUp...) contract1ID, _, err := keeper.Create(parentCtx, creator, hackatomWasm, nil) + require.NoError(t, err) + contract2ID, _, err := keeper.Create(parentCtx, creator, hackatomWasm, nil) require.NoError(t, err) diff --git a/x/wasm/keeper/legacy_querier.go b/x/wasm/keeper/legacy_querier.go index 8ff72e1f81..bba168dcdd 100644 --- a/x/wasm/keeper/legacy_querier.go +++ b/x/wasm/keeper/legacy_querier.go @@ -121,7 +121,7 @@ func queryContractState(ctx sdk.Context, bech, queryMethod string, data []byte, } } -func queryCodeList(ctx sdk.Context, keeper types.ViewKeeper) ([]types.CodeInfoResponse, error) { +func queryCodeList(ctx sdk.Context, keeper types.ViewKeeper) ([]types.CodeInfoResponse, error) { //nolint:unparam var info []types.CodeInfoResponse keeper.IterateCodeInfos(ctx, func(i uint64, res types.CodeInfo) bool { info = append(info, types.CodeInfoResponse{ @@ -135,7 +135,7 @@ func queryCodeList(ctx sdk.Context, keeper types.ViewKeeper) ([]types.CodeInfoRe return info, nil } -func queryContractHistory(ctx sdk.Context, contractAddr sdk.AccAddress, keeper types.ViewKeeper) ([]types.ContractCodeHistoryEntry, error) { +func queryContractHistory(ctx sdk.Context, contractAddr sdk.AccAddress, keeper types.ViewKeeper) ([]types.ContractCodeHistoryEntry, error) { //nolint:unparam history := keeper.GetContractHistory(ctx, contractAddr) // redact response for i := range history { diff --git a/x/wasm/keeper/legacy_querier_test.go b/x/wasm/keeper/legacy_querier_test.go index 1b6006fa30..86866845f3 100644 --- a/x/wasm/keeper/legacy_querier_test.go +++ b/x/wasm/keeper/legacy_querier_test.go @@ -30,7 +30,7 @@ func TestLegacyQueryContractState(t *testing.T) { contractID, _, err := keepers.ContractKeeper.Create(ctx, creator, wasmCode, nil) require.NoError(t, err) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: anyAddr, Beneficiary: bob, @@ -45,7 +45,8 @@ func TestLegacyQueryContractState(t *testing.T) { {Key: []byte("foo"), Value: []byte(`"bar"`)}, {Key: []byte{0x0, 0x1}, Value: []byte(`{"count":8}`)}, } - keeper.importContractState(ctx, addr, contractModel) + err = keeper.importContractState(ctx, addr, contractModel) + require.NoError(t, err) // this gets us full error, not redacted sdk.Error var defaultQueryGasLimit sdk.Gas = 3000000 @@ -168,7 +169,7 @@ func TestLegacyQueryContractListByCodeOrdering(t *testing.T) { codeID, _, err := keepers.ContractKeeper.Create(ctx, creator, wasmCode, nil) require.NoError(t, err) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: anyAddr, Beneficiary: bob, @@ -285,7 +286,7 @@ func TestLegacyQueryContractHistory(t *testing.T) { } for msg, spec := range specs { t.Run(msg, func(t *testing.T) { - _, _, myContractAddr := keyPubAddr() + _, _, myContractAddr := KeyPubAddr() keeper.appendToContractHistory(ctx, myContractAddr, spec.srcHistory...) var defaultQueryGasLimit sdk.Gas = 3000000 diff --git a/x/wasm/keeper/migrate_test.go b/x/wasm/keeper/migrate_test.go index 3b762c49d0..3a2bd1b5ff 100644 --- a/x/wasm/keeper/migrate_test.go +++ b/x/wasm/keeper/migrate_test.go @@ -32,10 +32,15 @@ func TestMigrate1To2(t *testing.T) { // create with no balance is also legal gotContractAddr1, _, err := keepers.ContractKeeper.Instantiate(ctx.WithEventManager(em), example.CodeID, creator, nil, initMsgBz, "demo contract 1", nil) + require.NoError(t, err) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + gotContractAddr2, _, err := keepers.ContractKeeper.Instantiate(ctx.WithEventManager(em), example.CodeID, creator, nil, initMsgBz, "demo contract 1", nil) + require.NoError(t, err) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + gotContractAddr3, _, err := keepers.ContractKeeper.Instantiate(ctx.WithEventManager(em), example.CodeID, creator, nil, initMsgBz, "demo contract 1", nil) + require.NoError(t, err) info1 := wasmKeeper.GetContractInfo(ctx, gotContractAddr1) info2 := wasmKeeper.GetContractInfo(ctx, gotContractAddr2) @@ -48,7 +53,8 @@ func TestMigrate1To2(t *testing.T) { // migrator migrator := NewMigrator(*wasmKeeper) - migrator.Migrate1to2(ctx) + err = migrator.Migrate1to2(ctx) + require.NoError(t, err) // check new store var allContract []string diff --git a/x/wasm/keeper/msg_dispatcher.go b/x/wasm/keeper/msg_dispatcher.go index 59a836fa5f..ef37883fb9 100644 --- a/x/wasm/keeper/msg_dispatcher.go +++ b/x/wasm/keeper/msg_dispatcher.go @@ -5,6 +5,7 @@ import ( "fmt" "sort" + errorsmod "cosmossdk.io/errors" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -184,7 +185,7 @@ func redactError(err error) error { // sdk/11 is out of gas // sdk/5 is insufficient funds (on bank send) // (we can theoretically redact less in the future, but this is a first step to safety) - codespace, code, _ := sdkerrors.ABCIInfo(err, false) + codespace, code, _ := errorsmod.ABCIInfo(err, false) return fmt.Errorf("codespace: %s, code: %d", codespace, code) } diff --git a/x/wasm/keeper/msg_dispatcher_test.go b/x/wasm/keeper/msg_dispatcher_test.go index e514ae4119..8c1b3f459c 100644 --- a/x/wasm/keeper/msg_dispatcher_test.go +++ b/x/wasm/keeper/msg_dispatcher_test.go @@ -400,10 +400,10 @@ func TestDispatchSubmessages(t *testing.T) { require.Error(t, gotErr) assert.Empty(t, em.Events()) return - } else { - require.NoError(t, gotErr) - assert.Equal(t, spec.expData, gotData) } + require.NoError(t, gotErr) + assert.Equal(t, spec.expData, gotData) + assert.Equal(t, spec.expCommits, mockStore.Committed) if len(spec.expEvents) == 0 { assert.Empty(t, em.Events()) diff --git a/x/wasm/keeper/msg_server_integration_test.go b/x/wasm/keeper/msg_server_integration_test.go index dde8ae7744..97ff98a688 100644 --- a/x/wasm/keeper/msg_server_integration_test.go +++ b/x/wasm/keeper/msg_server_integration_test.go @@ -5,11 +5,17 @@ import ( _ "embed" "testing" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/CosmWasm/wasmd/app" "github.com/CosmWasm/wasmd/x/wasm/types" @@ -19,7 +25,24 @@ import ( var wasmContract []byte func TestStoreCode(t *testing.T) { - wasmApp := app.Setup(false) + senderPrivKey := ed25519.GenPrivKey() + pubKey, err := cryptocodec.ToTmPubKeyInterface(senderPrivKey.PubKey()) + require.NoError(t, err) + + senderAddr := senderPrivKey.PubKey().Address().Bytes() + acc := authtypes.NewBaseAccount(senderAddr, senderPrivKey.PubKey(), 0, 0) + amount, ok := sdk.NewIntFromString("10000000000000000000") + require.True(t, ok) + + balance := banktypes.Balance{ + Address: acc.GetAddress().String(), + Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, amount)), + } + validator := tmtypes.NewValidator(pubKey, 1) + valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) + + wasmApp := app.SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, "test-1", nil, balance) + ctx := wasmApp.BaseApp.NewContext(false, tmproto.Header{}) _, _, sender := testdata.KeyTestPubAddr() msg := types.MsgStoreCodeFixture(func(m *types.MsgStoreCode) { diff --git a/x/wasm/keeper/options.go b/x/wasm/keeper/options.go index 223a771f63..cc5547f22c 100644 --- a/x/wasm/keeper/options.go +++ b/x/wasm/keeper/options.go @@ -57,7 +57,7 @@ func WithQueryHandlerDecorator(d func(old WasmVMQueryHandler) WasmVMQueryHandler } // WithQueryPlugins is an optional constructor parameter to pass custom query plugins for wasmVM requests. -// This option expects the default `QueryHandler` set and should not be combined with Option `WithQueryHandler` or `WithQueryHandlerDecorator`. +// This option expects the default `QueryHandler` set an should not be combined with Option `WithQueryHandler` or `WithQueryHandlerDecorator`. func WithQueryPlugins(x *QueryPlugins) Option { return optsFn(func(k *Keeper) { q, ok := k.wasmVMQueryHandler.(QueryPlugins) diff --git a/x/wasm/keeper/options_test.go b/x/wasm/keeper/options_test.go index 29d2f9bd26..efec8b64dc 100644 --- a/x/wasm/keeper/options_test.go +++ b/x/wasm/keeper/options_test.go @@ -74,7 +74,7 @@ func TestConstructorOptions(t *testing.T) { "api costs": { srcOpt: WithAPICosts(1, 2), verify: func(t *testing.T, k Keeper) { - t.Cleanup(setApiDefaults) + t.Cleanup(setAPIDefaults) assert.Equal(t, uint64(1), costHumanize) assert.Equal(t, uint64(2), costCanonical) }, @@ -110,7 +110,7 @@ func TestConstructorOptions(t *testing.T) { } } -func setApiDefaults() { +func setAPIDefaults() { costHumanize = DefaultGasCostHumanAddress * DefaultGasMultiplier costCanonical = DefaultGasCostCanonicalAddress * DefaultGasMultiplier } diff --git a/x/wasm/keeper/proposal_handler.go b/x/wasm/keeper/proposal_handler.go index efcf49c481..d8c7a55321 100644 --- a/x/wasm/keeper/proposal_handler.go +++ b/x/wasm/keeper/proposal_handler.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/CosmWasm/wasmd/x/wasm/types" ) diff --git a/x/wasm/keeper/proposal_integration_test.go b/x/wasm/keeper/proposal_integration_test.go index 9f7e49deef..e22f3f970e 100644 --- a/x/wasm/keeper/proposal_integration_test.go +++ b/x/wasm/keeper/proposal_integration_test.go @@ -10,7 +10,6 @@ import ( wasmvm "github.com/CosmWasm/wasmvm" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/params/client/utils" "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/stretchr/testify/assert" @@ -18,6 +17,10 @@ import ( "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" "github.com/CosmWasm/wasmd/x/wasm/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func TestStoreCodeProposal(t *testing.T) { @@ -59,7 +62,7 @@ func TestStoreCodeProposal(t *testing.T) { t.Run(msg, func(t *testing.T) { ctx, _ := parentCtx.CacheContext() myActorAddress := RandomBech32AccountAddress(t) - + govAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() src := types.StoreCodeProposalFixture(func(p *types.StoreCodeProposal) { p.RunAs = myActorAddress p.WASMByteCode = spec.code @@ -67,13 +70,18 @@ func TestStoreCodeProposal(t *testing.T) { p.CodeHash = checksum }) + msgContent, err := govv1.NewLegacyContent(src, govAddress) + require.NoError(t, err) + + em := sdk.NewEventManager() + // when stored - storedProposal, err := govKeeper.SubmitProposal(ctx, src) + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing123") require.NoError(t, err) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx, storedProposal.GetContent()) + handler := govKeeper.LegacyRouter().GetRoute(src.ProposalRoute()) + err = handler(ctx.WithEventManager(em), src) require.NoError(t, err) // then @@ -117,13 +125,17 @@ func TestInstantiateProposal(t *testing.T) { }) em := sdk.NewEventManager() + myActorAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err := govv1.NewLegacyContent(src, myActorAddress) + require.NoError(t, err) + // when stored - storedProposal, err := govKeeper.SubmitProposal(ctx, src) + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") require.NoError(t, err) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx.WithEventManager(em), storedProposal.GetContent()) + handler := govKeeper.LegacyRouter().GetRoute(src.ProposalRoute()) + err = handler(ctx.WithEventManager(em), src) require.NoError(t, err) // then @@ -170,8 +182,8 @@ func TestInstantiate2Proposal(t *testing.T) { var ( oneAddress sdk.AccAddress = bytes.Repeat([]byte{0x1}, types.ContractAddrLen) otherAddress sdk.AccAddress = bytes.Repeat([]byte{0x2}, types.ContractAddrLen) - label string = "label" - salt []byte = []byte("mySalt") + label = "label" + salt = []byte("mySalt") ) src := types.InstantiateContract2ProposalFixture(func(p *types.InstantiateContract2Proposal) { p.CodeID = firstCodeID @@ -183,15 +195,17 @@ func TestInstantiate2Proposal(t *testing.T) { contractAddress := BuildContractAddressPredictable(codeInfo.CodeHash, oneAddress, salt, []byte{}) em := sdk.NewEventManager() + events := em.Events() // when stored - storedProposal, err := govKeeper.SubmitProposal(ctx, src) + message, err := govv1.NewLegacyContent(src, authtypes.NewModuleAddress(govtypes.ModuleName).String()) require.NoError(t, err) - // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx.WithEventManager(em), storedProposal.GetContent()) - require.NoError(t, err) + handler := govKeeper.Router().Handler(message) + + res, gotErr := handler(ctx, message) + events = append(events, res.GetEvents()...) + require.NoError(t, gotErr) cInfo := wasmKeeper.GetContractInfo(ctx, contractAddress) require.NotNil(t, cInfo) @@ -208,12 +222,12 @@ func TestInstantiate2Proposal(t *testing.T) { }} assert.Equal(t, expHistory, wasmKeeper.GetContractHistory(ctx, contractAddress)) // and event - require.Len(t, em.Events(), 3, "%#v", em.Events()) - require.Equal(t, types.EventTypeInstantiate, em.Events()[0].Type) - require.Equal(t, types.WasmModuleEventType, em.Events()[1].Type) - require.Equal(t, types.EventTypeGovContractResult, em.Events()[2].Type) - require.Len(t, em.Events()[2].Attributes, 1) - require.NotEmpty(t, em.Events()[2].Attributes[0]) + require.Len(t, events, 3, "%#v", events) + require.Equal(t, types.EventTypeInstantiate, events[0].Type) + require.Equal(t, types.WasmModuleEventType, events[1].Type) + require.Equal(t, types.EventTypeGovContractResult, events[2].Type) + require.Len(t, events[2].Attributes, 1) + require.NotEmpty(t, events[2].Attributes[0]) } func TestInstantiateProposal_NoAdmin(t *testing.T) { @@ -241,7 +255,11 @@ func TestInstantiateProposal_NoAdmin(t *testing.T) { p.Admin = "invalid" p.Label = "testing" }) - _, err = govKeeper.SubmitProposal(ctx, src) + msgContent, err := govv1.NewLegacyContent(src, oneAddress.String()) + require.NoError(t, err) + + // when stored + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") require.Error(t, err) // test with no admin @@ -252,14 +270,16 @@ func TestInstantiateProposal_NoAdmin(t *testing.T) { p.Label = "testing" }) em := sdk.NewEventManager() + msgContent, err = govv1.NewLegacyContent(src, oneAddress.String()) + require.NoError(t, err) // when stored - storedProposal, err := govKeeper.SubmitProposal(ctx, src) - require.NoError(t, err) + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") + require.Error(t, err) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx.WithEventManager(em), storedProposal.GetContent()) + handler := govKeeper.LegacyRouter().GetRoute(src.ProposalRoute()) + err = handler(ctx.WithEventManager(em), src) require.NoError(t, err) // then @@ -316,13 +336,17 @@ func TestStoreAndInstantiateContractProposal(t *testing.T) { }) em := sdk.NewEventManager() + myActorAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err := govv1.NewLegacyContent(src, myActorAddress) + require.NoError(t, err) + // when stored - storedProposal, err := govKeeper.SubmitProposal(ctx, src) + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") require.NoError(t, err) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx.WithEventManager(em), storedProposal.GetContent()) + handler := govKeeper.LegacyRouter().GetRoute(src.ProposalRoute()) + err = handler(ctx.WithEventManager(em), src) require.NoError(t, err) // then @@ -402,13 +426,17 @@ func TestMigrateProposal(t *testing.T) { em := sdk.NewEventManager() + myActorAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err := govv1.NewLegacyContent(&src, myActorAddress) + require.NoError(t, err) + // when stored - storedProposal, err := govKeeper.SubmitProposal(ctx, &src) + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") require.NoError(t, err) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx.WithEventManager(em), storedProposal.GetContent()) + handler := govKeeper.LegacyRouter().GetRoute(src.ProposalRoute()) + err = handler(ctx.WithEventManager(em), &src) require.NoError(t, err) // then @@ -463,10 +491,12 @@ func TestExecuteProposal(t *testing.T) { RunAs: exampleContract.BeneficiaryAddr.String(), } - em := sdk.NewEventManager() + myActorAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err := govv1.NewLegacyContent(&badSrc, myActorAddress) + require.NoError(t, err) // fails on store - this doesn't have permission - storedProposal, err := govKeeper.SubmitProposal(ctx, &badSrc) + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") require.Error(t, err) // balance should not change bal = bankKeeper.GetBalance(ctx, contractAddr, "denom") @@ -481,15 +511,17 @@ func TestExecuteProposal(t *testing.T) { RunAs: exampleContract.VerifierAddr.String(), } - em = sdk.NewEventManager() + myActorAddress = govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err = govv1.NewLegacyContent(&src, myActorAddress) + require.NoError(t, err) // when stored - storedProposal, err = govKeeper.SubmitProposal(ctx, &src) + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") require.NoError(t, err) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx.WithEventManager(em), storedProposal.GetContent()) + handler := govKeeper.LegacyRouter().GetRoute(src.ProposalRoute()) + err = handler(ctx, &src) require.NoError(t, err) // balance should be empty (proper release) @@ -503,7 +535,7 @@ func TestSudoProposal(t *testing.T) { exampleContract := InstantiateHackatomExampleContract(t, ctx, keepers) contractAddr := exampleContract.Contract - _, _, anyAddr := keyPubAddr() + _, _, anyAddr := KeyPubAddr() // check balance bal := bankKeeper.GetBalance(ctx, contractAddr, "denom") @@ -532,15 +564,17 @@ func TestSudoProposal(t *testing.T) { Msg: stealMsgBz, } - em := sdk.NewEventManager() + myActorAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err := govv1.NewLegacyContent(&src, myActorAddress) + require.NoError(t, err) // when stored - storedProposal, err := govKeeper.SubmitProposal(ctx, &src) + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") require.NoError(t, err) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx.WithEventManager(em), storedProposal.GetContent()) + handler := govKeeper.LegacyRouter().GetRoute(src.ProposalRoute()) + err = handler(ctx, &src) require.NoError(t, err) // balance should be empty (and verifier richer) @@ -560,7 +594,7 @@ func TestAdminProposals(t *testing.T) { specs := map[string]struct { state types.ContractInfo - srcProposal govtypes.Content + srcProposal govv1beta1.Content expAdmin sdk.AccAddress }{ "update with different admin": { @@ -628,12 +662,16 @@ func TestAdminProposals(t *testing.T) { require.NoError(t, wasmKeeper.importContract(ctx, contractAddr, &spec.state, []types.Model{}, entries)) // when stored - storedProposal, err := govKeeper.SubmitProposal(ctx, spec.srcProposal) + myActorAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err := govv1.NewLegacyContent(spec.srcProposal, myActorAddress) + require.NoError(t, err) + + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") require.NoError(t, err) // and execute proposal - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx, storedProposal.GetContent()) + handler := govKeeper.LegacyRouter().GetRoute(spec.srcProposal.ProposalRoute()) + err = handler(ctx, spec.srcProposal) require.NoError(t, err) // then @@ -719,18 +757,22 @@ func TestUpdateParamsProposal(t *testing.T) { var jsonProposal utils.ParamChangeProposalJSON require.NoError(t, legacyAmino.UnmarshalJSON(bz, &jsonProposal)) - proposal := proposal.ParameterChangeProposal{ + prop := proposal.ParameterChangeProposal{ Title: jsonProposal.Title, Description: jsonProposal.Description, Changes: jsonProposal.Changes.ToParamChanges(), } // when stored - storedProposal, err := govKeeper.SubmitProposal(ctx, &proposal) + myActorAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err := govv1.NewLegacyContent(&prop, myActorAddress) + require.NoError(t, err) + + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") require.NoError(t, err) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - err = handler(ctx, storedProposal.GetContent()) + handler := govKeeper.LegacyRouter().GetRoute(prop.ProposalRoute()) + err = handler(ctx, &prop) require.NoError(t, err) // then @@ -801,24 +843,27 @@ func TestPinCodesProposal(t *testing.T) { gotPinnedChecksums = nil ctx, _ := parentCtx.CacheContext() mock.PinFn = spec.mockFn - proposal := types.PinCodesProposal{ + prop := types.PinCodesProposal{ Title: "Foo", Description: "Bar", CodeIDs: spec.srcCodeIDs, } // when stored - storedProposal, gotErr := govKeeper.SubmitProposal(ctx, &proposal) + myActorAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err := govv1.NewLegacyContent(&prop, myActorAddress) + require.NoError(t, err) + + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") if spec.expErr { - require.Error(t, gotErr) + require.Error(t, err) return } - require.NoError(t, gotErr) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - gotErr = handler(ctx, storedProposal.GetContent()) - require.NoError(t, gotErr) + handler := govKeeper.LegacyRouter().GetRoute(prop.ProposalRoute()) + err = handler(ctx, &prop) + require.NoError(t, err) // then for i := range spec.srcCodeIDs { @@ -889,24 +934,27 @@ func TestUnpinCodesProposal(t *testing.T) { gotUnpinnedChecksums = nil ctx, _ := parentCtx.CacheContext() mock.UnpinFn = spec.mockFn - proposal := types.UnpinCodesProposal{ + prop := types.UnpinCodesProposal{ Title: "Foo", Description: "Bar", CodeIDs: spec.srcCodeIDs, } // when stored - storedProposal, gotErr := govKeeper.SubmitProposal(ctx, &proposal) + myActorAddress := govKeeper.GetGovernanceAccount(ctx).GetAddress().String() + msgContent, err := govv1.NewLegacyContent(&prop, myActorAddress) + require.NoError(t, err) + + _, err = govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "testing 123") if spec.expErr { - require.Error(t, gotErr) + require.Error(t, err) return } - require.NoError(t, gotErr) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - gotErr = handler(ctx, storedProposal.GetContent()) - require.NoError(t, gotErr) + handler := govKeeper.LegacyRouter().GetRoute(prop.ProposalRoute()) + err = handler(ctx, &prop) + require.NoError(t, err) // then for i := range spec.srcCodeIDs { @@ -990,7 +1038,9 @@ func TestUpdateInstantiateConfigProposal(t *testing.T) { } // when stored - storedProposal, gotErr := govKeeper.SubmitProposal(ctx, &proposal) + message, gotErr := govv1.NewLegacyContent(&proposal, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + require.NoError(t, gotErr) + _, gotErr = govKeeper.SubmitProposal(ctx, []sdk.Msg{message}, "") if spec.expErr { require.Error(t, gotErr) return @@ -998,8 +1048,10 @@ func TestUpdateInstantiateConfigProposal(t *testing.T) { require.NoError(t, gotErr) // and proposal execute - handler := govKeeper.Router().GetRoute(storedProposal.ProposalRoute()) - gotErr = handler(ctx, storedProposal.GetContent()) + + handler := govKeeper.Router().Handler(message) + + _, gotErr = handler(ctx, message) require.NoError(t, gotErr) // then diff --git a/x/wasm/keeper/querier.go b/x/wasm/keeper/querier.go index cd573ab5a3..d7e7e4f10b 100644 --- a/x/wasm/keeper/querier.go +++ b/x/wasm/keeper/querier.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc/status" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" @@ -21,13 +22,13 @@ var _ types.QueryServer = &grpcQuerier{} type grpcQuerier struct { cdc codec.Codec - storeKey sdk.StoreKey + storeKey storetypes.StoreKey keeper types.ViewKeeper queryGasLimit sdk.Gas } // NewGrpcQuerier constructor -func NewGrpcQuerier(cdc codec.Codec, storeKey sdk.StoreKey, keeper types.ViewKeeper, queryGasLimit sdk.Gas) *grpcQuerier { //nolint:revive +func NewGrpcQuerier(cdc codec.Codec, storeKey storetypes.StoreKey, keeper types.ViewKeeper, queryGasLimit sdk.Gas) *grpcQuerier { //nolint:revive return &grpcQuerier{cdc: cdc, storeKey: storeKey, keeper: keeper, queryGasLimit: queryGasLimit} } diff --git a/x/wasm/keeper/querier_test.go b/x/wasm/keeper/querier_test.go index 9568ad97d5..23fcba859c 100644 --- a/x/wasm/keeper/querier_test.go +++ b/x/wasm/keeper/querier_test.go @@ -9,6 +9,7 @@ import ( "testing" "time" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -17,7 +18,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkErrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" @@ -271,7 +271,7 @@ func TestQueryContractListByCodeOrdering(t *testing.T) { codeID, _, err := keepers.ContractKeeper.Create(ctx, creator, wasmCode, nil) require.NoError(t, err) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: anyAddr, Beneficiary: bob, @@ -695,19 +695,19 @@ func TestQueryCodeInfo(t *testing.T) { anyAddress, err := sdk.AccAddressFromBech32("cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz") require.NoError(t, err) specs := map[string]struct { - codeId uint64 + codeID uint64 accessConfig types.AccessConfig }{ "everybody": { - codeId: 1, + codeID: 1, accessConfig: types.AllowEverybody, }, "nobody": { - codeId: 10, + codeID: 10, accessConfig: types.AllowNobody, }, "with_address": { - codeId: 20, + codeID: 20, accessConfig: types.AccessTypeOnlyAddress.With(anyAddress), }, } @@ -715,19 +715,19 @@ func TestQueryCodeInfo(t *testing.T) { t.Run(msg, func(t *testing.T) { codeInfo := types.CodeInfoFixture(types.WithSHA256CodeHash(wasmCode)) codeInfo.InstantiateConfig = spec.accessConfig - require.NoError(t, keeper.importCode(ctx, spec.codeId, + require.NoError(t, keeper.importCode(ctx, spec.codeID, codeInfo, wasmCode), ) q := Querier(keeper) got, err := q.Code(sdk.WrapSDKContext(ctx), &types.QueryCodeRequest{ - CodeId: spec.codeId, + CodeId: spec.codeID, }) require.NoError(t, err) expectedResponse := &types.QueryCodeResponse{ CodeInfoResponse: &types.CodeInfoResponse{ - CodeID: spec.codeId, + CodeID: spec.codeID, Creator: codeInfo.Creator, DataHash: codeInfo.CodeHash, InstantiatePermission: spec.accessConfig, @@ -757,22 +757,22 @@ func TestQueryCodeInfoList(t *testing.T) { codes := []struct { name string - codeId uint64 + codeID uint64 codeInfo types.CodeInfo }{ { name: "everybody", - codeId: 1, + codeID: 1, codeInfo: codeInfoWithConfig(types.AllowEverybody), }, { - codeId: 10, + codeID: 10, name: "nobody", codeInfo: codeInfoWithConfig(types.AllowNobody), }, { name: "with_address", - codeId: 20, + codeID: 20, codeInfo: codeInfoWithConfig(types.AccessTypeOnlyAddress.With(anyAddress)), }, } @@ -780,14 +780,14 @@ func TestQueryCodeInfoList(t *testing.T) { allCodesResponse := make([]types.CodeInfoResponse, 0) for _, code := range codes { t.Run(fmt.Sprintf("import_%s", code.name), func(t *testing.T) { - require.NoError(t, keeper.importCode(ctx, code.codeId, + require.NoError(t, keeper.importCode(ctx, code.codeID, code.codeInfo, wasmCode), ) }) allCodesResponse = append(allCodesResponse, types.CodeInfoResponse{ - CodeID: code.codeId, + CodeID: code.codeID, Creator: code.codeInfo.Creator, DataHash: code.codeInfo.CodeHash, InstantiatePermission: code.codeInfo.InstantiateConfig, @@ -818,7 +818,7 @@ func TestQueryContractsByCreatorList(t *testing.T) { codeID, _, err := keepers.ContractKeeper.Create(ctx, creator, wasmCode, nil) require.NoError(t, err) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: anyAddr, Beneficiary: bob, diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index e6be4dde76..e696307be0 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -3,13 +3,11 @@ package keeper import ( "encoding/json" "errors" - "fmt" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" - abci "github.com/tendermint/tendermint/abci/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" "github.com/CosmWasm/wasmd/x/wasm/types" @@ -103,6 +101,7 @@ func DefaultQueryPlugins( staking types.StakingKeeper, distKeeper types.DistributionKeeper, channelKeeper types.ChannelKeeper, + queryRouter GRPCQueryRouter, wasm wasmQueryKeeper, ) QueryPlugins { return QueryPlugins{ @@ -110,7 +109,7 @@ func DefaultQueryPlugins( Custom: NoCustomQuerier, IBC: IBCQuerier(wasm, channelKeeper), Staking: StakingQuerier(staking, distKeeper), - Stargate: RejectStargateQuerier(), + Stargate: StargateQuerier(queryRouter), Wasm: WasmQuerier(wasm), } } @@ -281,47 +280,9 @@ func IBCQuerier(wasm contractMetaDataSource, channelKeeper types.ChannelKeeper) } } -// RejectStargateQuerier rejects all stargate queries -func RejectStargateQuerier() func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { - return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { - return nil, wasmvmtypes.UnsupportedRequest{Kind: "Stargate queries are disabled"} - } -} - -// AcceptedStargateQueries define accepted Stargate queries as a map with path as key and response type as value. -// For example: -// acceptList["/cosmos.auth.v1beta1.Query/Account"]= &authtypes.QueryAccountResponse{} -type AcceptedStargateQueries map[string]codec.ProtoMarshaler - -// AcceptListStargateQuerier supports a preconfigured set of stargate queries only. -// All arguments must be non nil. -// -// Warning: Chains need to test and maintain their accept list carefully. -// There were critical consensus breaking issues in the past with non-deterministic behaviour in the SDK. -// -// This queries can be set via WithQueryPlugins option in the wasm keeper constructor: -// WithQueryPlugins(&QueryPlugins{Stargate: AcceptListStargateQuerier(acceptList, queryRouter, codec)}) -func AcceptListStargateQuerier(acceptList AcceptedStargateQueries, queryRouter GRPCQueryRouter, codec codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { - return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { - protoResponse, accepted := acceptList[request.Path] - if !accepted { - return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", request.Path)} - } - - route := queryRouter.Route(request.Path) - if route == nil { - return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("No route to query '%s'", request.Path)} - } - - res, err := route(ctx, abci.RequestQuery{ - Data: request.Data, - Path: request.Path, - }) - if err != nil { - return nil, err - } - - return ConvertProtoToJSONMarshal(codec, protoResponse, res.Value) +func StargateQuerier(queryRouter GRPCQueryRouter) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { + return func(ctx sdk.Context, msg *wasmvmtypes.StargateQuery) ([]byte, error) { + return nil, wasmvmtypes.UnsupportedRequest{Kind: "Stargate queries are disabled."} } } diff --git a/x/wasm/keeper/query_plugins_test.go b/x/wasm/keeper/query_plugins_test.go index fb5f6951e0..9b509819ae 100644 --- a/x/wasm/keeper/query_plugins_test.go +++ b/x/wasm/keeper/query_plugins_test.go @@ -5,25 +5,22 @@ import ( "encoding/json" "fmt" "testing" - "time" - wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/store" + + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + dbm "github.com/tendermint/tm-db" + + wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" "github.com/CosmWasm/wasmd/app" "github.com/CosmWasm/wasmd/x/wasm/keeper" @@ -89,7 +86,7 @@ func TestIBCQuerier(t *testing.T) { srcQuery *wasmvmtypes.IBCQuery wasmKeeper *mockWasmQueryKeeper channelKeeper *wasmtesting.MockChannelKeeper - expJsonResult string + expJSONResult string expErr *sdkerrors.Error }{ "query port id": { @@ -102,7 +99,7 @@ func TestIBCQuerier(t *testing.T) { }, }, channelKeeper: &wasmtesting.MockChannelKeeper{}, - expJsonResult: `{"port_id":"myIBCPortID"}`, + expJSONResult: `{"port_id":"myIBCPortID"}`, }, "query list channels - all": { srcQuery: &wasmvmtypes.IBCQuery{ @@ -111,7 +108,7 @@ func TestIBCQuerier(t *testing.T) { channelKeeper: &wasmtesting.MockChannelKeeper{ IterateChannelsFn: wasmtesting.MockChannelKeeperIterator(myExampleChannels), }, - expJsonResult: `{ + expJSONResult: `{ "channels": [ { "endpoint": { @@ -151,7 +148,7 @@ func TestIBCQuerier(t *testing.T) { channelKeeper: &wasmtesting.MockChannelKeeper{ IterateChannelsFn: wasmtesting.MockChannelKeeperIterator(myExampleChannels), }, - expJsonResult: `{ + expJSONResult: `{ "channels": [ { "endpoint": { @@ -178,7 +175,7 @@ func TestIBCQuerier(t *testing.T) { channelKeeper: &wasmtesting.MockChannelKeeper{ IterateChannelsFn: wasmtesting.MockChannelKeeperIterator(myExampleChannels), }, - expJsonResult: `{"channels": []}`, + expJSONResult: `{"channels": []}`, }, "query channel": { srcQuery: &wasmvmtypes.IBCQuery{ @@ -201,7 +198,7 @@ func TestIBCQuerier(t *testing.T) { }, true }, }, - expJsonResult: `{ + expJSONResult: `{ "channel": { "endpoint": { "port_id": "myQueryPortID", @@ -242,7 +239,7 @@ func TestIBCQuerier(t *testing.T) { }, true }, }, - expJsonResult: `{ + expJSONResult: `{ "channel": { "endpoint": { "port_id": "myLoadedPortID", @@ -278,7 +275,7 @@ func TestIBCQuerier(t *testing.T) { }, true }, }, - expJsonResult: "{}", + expJSONResult: "{}", }, "query channel in closed state": { srcQuery: &wasmvmtypes.IBCQuery{ @@ -301,7 +298,7 @@ func TestIBCQuerier(t *testing.T) { }, true }, }, - expJsonResult: "{}", + expJSONResult: "{}", }, "query channel - empty result": { srcQuery: &wasmvmtypes.IBCQuery{ @@ -315,7 +312,7 @@ func TestIBCQuerier(t *testing.T) { return channeltypes.Channel{}, false }, }, - expJsonResult: "{}", + expJSONResult: "{}", }, } for name, spec := range specs { @@ -326,7 +323,7 @@ func TestIBCQuerier(t *testing.T) { if spec.expErr != nil { return } - assert.JSONEq(t, spec.expJsonResult, string(gotResult), string(gotResult)) + assert.JSONEq(t, spec.expJSONResult, string(gotResult), string(gotResult)) }) } } @@ -563,71 +560,6 @@ func TestQueryErrors(t *testing.T) { } } -func TestAcceptListStargateQuerier(t *testing.T) { - wasmApp := app.SetupWithEmptyStore(t) - ctx := wasmApp.NewUncachedContext(false, tmproto.Header{ChainID: "foo", Height: 1, Time: time.Now()}) - wasmApp.StakingKeeper.SetParams(ctx, stakingtypes.DefaultParams()) - - addrs := app.AddTestAddrs(wasmApp, ctx, 2, sdk.NewInt(1_000_000)) - accepted := keeper.AcceptedStargateQueries{ - "/cosmos.auth.v1beta1.Query/Account": &authtypes.QueryAccountResponse{}, - "/no/route/to/this": &authtypes.QueryAccountResponse{}, - } - - marshal := func(pb proto.Message) []byte { - b, err := proto.Marshal(pb) - require.NoError(t, err) - return b - } - - specs := map[string]struct { - req *wasmvmtypes.StargateQuery - expErr bool - expResp string - }{ - "in accept list - success result": { - req: &wasmvmtypes.StargateQuery{ - Path: "/cosmos.auth.v1beta1.Query/Account", - Data: marshal(&authtypes.QueryAccountRequest{Address: addrs[0].String()}), - }, - expResp: fmt.Sprintf(`{"account":{"@type":"/cosmos.auth.v1beta1.BaseAccount","address":%q,"pub_key":null,"account_number":"1","sequence":"0"}}`, addrs[0].String()), - }, - "in accept list - error result": { - req: &wasmvmtypes.StargateQuery{ - Path: "/cosmos.auth.v1beta1.Query/Account", - Data: marshal(&authtypes.QueryAccountRequest{Address: sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()).String()}), - }, - expErr: true, - }, - "not in accept list": { - req: &wasmvmtypes.StargateQuery{ - Path: "/cosmos.bank.v1beta1.Query/AllBalances", - Data: marshal(&banktypes.QueryAllBalancesRequest{Address: addrs[0].String()}), - }, - expErr: true, - }, - "unknown route": { - req: &wasmvmtypes.StargateQuery{ - Path: "/no/route/to/this", - Data: marshal(&banktypes.QueryAllBalancesRequest{Address: addrs[0].String()}), - }, - expErr: true, - }, - } - for name, spec := range specs { - t.Run(name, func(t *testing.T) { - q := keeper.AcceptListStargateQuerier(accepted, wasmApp.GRPCQueryRouter(), wasmApp.AppCodec()) - gotBz, gotErr := q(ctx, spec.req) - if spec.expErr { - require.Error(t, gotErr) - return - } - require.NoError(t, gotErr) - assert.JSONEq(t, spec.expResp, string(gotBz), string(gotBz)) - }) - } -} - type mockWasmQueryKeeper struct { GetContractInfoFn func(ctx sdk.Context, contractAddress sdk.AccAddress) *types.ContractInfo QueryRawFn func(ctx sdk.Context, contractAddress sdk.AccAddress, key []byte) []byte diff --git a/x/wasm/keeper/recurse_test.go b/x/wasm/keeper/recurse_test.go index 5bfb20bdec..73647df5fe 100644 --- a/x/wasm/keeper/recurse_test.go +++ b/x/wasm/keeper/recurse_test.go @@ -38,7 +38,7 @@ type recurseResponse struct { // number os wasm queries called from a contract var totalWasmQueryCounter int -func initRecurseContract(t *testing.T) (contract sdk.AccAddress, creator sdk.AccAddress, ctx sdk.Context, keeper *Keeper) { +func initRecurseContract(t *testing.T) (contract sdk.AccAddress, creator sdk.AccAddress, ctx sdk.Context, keeper *Keeper) { //nolint:unparam countingQuerierDec := func(realWasmQuerier WasmVMQueryHandler) WasmVMQueryHandler { return WasmVMQueryHandlerFn(func(ctx sdk.Context, caller sdk.AccAddress, request wasmvmtypes.QueryRequest) ([]byte, error) { totalWasmQueryCounter++ diff --git a/x/wasm/keeper/reflect_test.go b/x/wasm/keeper/reflect_test.go index 0d61867a7b..8448362510 100644 --- a/x/wasm/keeper/reflect_test.go +++ b/x/wasm/keeper/reflect_test.go @@ -44,7 +44,7 @@ func TestReflectContractSend(t *testing.T) { deposit := sdk.NewCoins(sdk.NewInt64Coin("denom", 100000)) creator := keepers.Faucet.NewFundedRandomAccount(ctx, deposit...) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() // upload reflect code reflectID, _, err := keeper.Create(ctx, creator, testdata.ReflectContractWasm(), nil) @@ -77,10 +77,10 @@ func TestReflectContractSend(t *testing.T) { require.NotEmpty(t, escrowAddr) // let's make sure all balances make sense - checkAccount(t, ctx, accKeeper, bankKeeper, creator, sdk.NewCoins(sdk.NewInt64Coin("denom", 35000))) // 100k - 40k - 25k - checkAccount(t, ctx, accKeeper, bankKeeper, reflectAddr, reflectStart) - checkAccount(t, ctx, accKeeper, bankKeeper, escrowAddr, escrowStart) - checkAccount(t, ctx, accKeeper, bankKeeper, bob, nil) + CheckAccount(t, ctx, accKeeper, bankKeeper, creator, sdk.NewCoins(sdk.NewInt64Coin("denom", 35000))) // 100k - 40k - 25k + CheckAccount(t, ctx, accKeeper, bankKeeper, reflectAddr, reflectStart) + CheckAccount(t, ctx, accKeeper, bankKeeper, escrowAddr, escrowStart) + CheckAccount(t, ctx, accKeeper, bankKeeper, bob, nil) // now for the trick.... we reflect a message through the reflect to call the escrow // we also send an additional 14k tokens there. @@ -110,10 +110,10 @@ func TestReflectContractSend(t *testing.T) { require.NoError(t, err) // did this work??? - checkAccount(t, ctx, accKeeper, bankKeeper, creator, sdk.NewCoins(sdk.NewInt64Coin("denom", 35000))) // same as before - checkAccount(t, ctx, accKeeper, bankKeeper, reflectAddr, sdk.NewCoins(sdk.NewInt64Coin("denom", 26000))) // 40k - 14k (from send) - checkAccount(t, ctx, accKeeper, bankKeeper, escrowAddr, sdk.Coins{}) // emptied reserved - checkAccount(t, ctx, accKeeper, bankKeeper, bob, sdk.NewCoins(sdk.NewInt64Coin("denom", 39000))) // all escrow of 25k + 14k + CheckAccount(t, ctx, accKeeper, bankKeeper, creator, sdk.NewCoins(sdk.NewInt64Coin("denom", 35000))) // same as before + CheckAccount(t, ctx, accKeeper, bankKeeper, reflectAddr, sdk.NewCoins(sdk.NewInt64Coin("denom", 26000))) // 40k - 14k (from send) + CheckAccount(t, ctx, accKeeper, bankKeeper, escrowAddr, sdk.Coins{}) // emptied reserved + CheckAccount(t, ctx, accKeeper, bankKeeper, bob, sdk.NewCoins(sdk.NewInt64Coin("denom", 39000))) // all escrow of 25k + 14k } func TestReflectCustomMsg(t *testing.T) { @@ -124,7 +124,7 @@ func TestReflectCustomMsg(t *testing.T) { deposit := sdk.NewCoins(sdk.NewInt64Coin("denom", 100000)) creator := keepers.Faucet.NewFundedRandomAccount(ctx, deposit...) bob := keepers.Faucet.NewFundedRandomAccount(ctx, deposit...) - _, _, fred := keyPubAddr() + _, _, fred := KeyPubAddr() // upload code codeID, _, err := keeper.Create(ctx, creator, testdata.ReflectContractWasm(), nil) @@ -149,9 +149,9 @@ func TestReflectCustomMsg(t *testing.T) { require.NoError(t, err) // check some account values - checkAccount(t, ctx, accKeeper, bankKeeper, contractAddr, contractStart) - checkAccount(t, ctx, accKeeper, bankKeeper, bob, deposit) - checkAccount(t, ctx, accKeeper, bankKeeper, fred, nil) + CheckAccount(t, ctx, accKeeper, bankKeeper, contractAddr, contractStart) + CheckAccount(t, ctx, accKeeper, bankKeeper, bob, deposit) + CheckAccount(t, ctx, accKeeper, bankKeeper, fred, nil) // bob can send contract's tokens to fred (using SendMsg) msgs := []wasmvmtypes.CosmosMsg{{ @@ -176,10 +176,10 @@ func TestReflectCustomMsg(t *testing.T) { require.NoError(t, err) // fred got coins - checkAccount(t, ctx, accKeeper, bankKeeper, fred, sdk.NewCoins(sdk.NewInt64Coin("denom", 15000))) + CheckAccount(t, ctx, accKeeper, bankKeeper, fred, sdk.NewCoins(sdk.NewInt64Coin("denom", 15000))) // contract lost them - checkAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.NewCoins(sdk.NewInt64Coin("denom", 25000))) - checkAccount(t, ctx, accKeeper, bankKeeper, bob, deposit) + CheckAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.NewCoins(sdk.NewInt64Coin("denom", 25000))) + CheckAccount(t, ctx, accKeeper, bankKeeper, bob, deposit) // construct an opaque message var sdkSendMsg sdk.Msg = &banktypes.MsgSend{ @@ -201,10 +201,10 @@ func TestReflectCustomMsg(t *testing.T) { require.NoError(t, err) // fred got more coins - checkAccount(t, ctx, accKeeper, bankKeeper, fred, sdk.NewCoins(sdk.NewInt64Coin("denom", 38000))) + CheckAccount(t, ctx, accKeeper, bankKeeper, fred, sdk.NewCoins(sdk.NewInt64Coin("denom", 38000))) // contract lost them - checkAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.NewCoins(sdk.NewInt64Coin("denom", 2000))) - checkAccount(t, ctx, accKeeper, bankKeeper, bob, deposit) + CheckAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.NewCoins(sdk.NewInt64Coin("denom", 2000))) + CheckAccount(t, ctx, accKeeper, bankKeeper, bob, deposit) } func TestMaskReflectCustomQuery(t *testing.T) { @@ -262,7 +262,7 @@ func TestReflectStargateQuery(t *testing.T) { funds := sdk.NewCoins(sdk.NewInt64Coin("denom", 320000)) contractStart := sdk.NewCoins(sdk.NewInt64Coin("denom", 40000)) - expectedBalance := funds.Sub(contractStart) + expectedBalance := funds.Sub(contractStart...) creator := keepers.Faucet.NewFundedRandomAccount(ctx, funds...) // upload code @@ -331,7 +331,7 @@ func TestReflectTotalSupplyQuery(t *testing.T) { Chain: &testdata.ChainQuery{ Request: &wasmvmtypes.QueryRequest{ Bank: &wasmvmtypes.BankQuery{ - Supply: &wasmvmtypes.SupplyQuery{spec.denom}, + Supply: &wasmvmtypes.SupplyQuery{Denom: spec.denom}, }, }, }, @@ -373,6 +373,8 @@ func TestReflectInvalidStargateQuery(t *testing.T) { Address: creator.String(), } protoQueryBin, err := proto.Marshal(&protoQuery) + require.NoError(t, err) + protoRequest := wasmvmtypes.QueryRequest{ Stargate: &wasmvmtypes.StargateQuery{ Path: "/cosmos.bank.v1beta1.Query/AllBalances", @@ -384,10 +386,10 @@ func TestReflectInvalidStargateQuery(t *testing.T) { }) require.NoError(t, err) - // make a query on the chain, should not be whitelisted + // make a query on the chain, should be blacklisted _, err = keeper.QuerySmart(ctx, contractAddr, protoQueryBz) require.Error(t, err) - require.Contains(t, err.Error(), "Unsupported query") + require.Contains(t, err.Error(), "Stargate queries are disabled") // now, try to build a protobuf query protoRequest = wasmvmtypes.QueryRequest{ @@ -404,7 +406,7 @@ func TestReflectInvalidStargateQuery(t *testing.T) { // make a query on the chain, should be blacklisted _, err = keeper.QuerySmart(ctx, contractAddr, protoQueryBz) require.Error(t, err) - require.Contains(t, err.Error(), "Unsupported query") + require.Contains(t, err.Error(), "Stargate queries are disabled") // and another one protoRequest = wasmvmtypes.QueryRequest{ @@ -421,7 +423,7 @@ func TestReflectInvalidStargateQuery(t *testing.T) { // make a query on the chain, should be blacklisted _, err = keeper.QuerySmart(ctx, contractAddr, protoQueryBz) require.Error(t, err) - require.Contains(t, err.Error(), "Unsupported query") + require.Contains(t, err.Error(), "Stargate queries are disabled") } type reflectState struct { @@ -565,7 +567,7 @@ func TestRustPanicIsHandled(t *testing.T) { assert.Nil(t, gotData) } -func checkAccount(t *testing.T, ctx sdk.Context, accKeeper authkeeper.AccountKeeper, bankKeeper bankkeeper.Keeper, addr sdk.AccAddress, expected sdk.Coins) { +func CheckAccount(t *testing.T, ctx sdk.Context, accKeeper authkeeper.AccountKeeper, bankKeeper bankkeeper.Keeper, addr sdk.AccAddress, expected sdk.Coins) { acct := accKeeper.GetAccount(ctx, addr) if expected == nil { assert.Nil(t, acct) @@ -598,7 +600,7 @@ func toReflectRawMsg(cdc codec.Codec, msg sdk.Msg) (wasmvmtypes.CosmosMsg, error if err != nil { return wasmvmtypes.CosmosMsg{}, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) } - customMsg, err := json.Marshal(reflectCustomMsg{ + customMsg, _ := json.Marshal(reflectCustomMsg{ Raw: rawBz, }) res := wasmvmtypes.CosmosMsg{ @@ -651,19 +653,10 @@ type customQueryResponse struct { Msg string `json:"msg"` } -// these are the return values from contract -> go depending on type of query -type ownerResponse struct { - Owner string `json:"owner"` -} - type capitalizedResponse struct { Text string `json:"text"` } -type chainResponse struct { - Data []byte `json:"data"` -} - // reflectPlugins needs to be registered in test setup to handle custom query callbacks func reflectPlugins() *QueryPlugins { return &QueryPlugins{ diff --git a/x/wasm/keeper/snapshotter.go b/x/wasm/keeper/snapshotter.go index fcece63714..710112730e 100644 --- a/x/wasm/keeper/snapshotter.go +++ b/x/wasm/keeper/snapshotter.go @@ -98,6 +98,14 @@ func (ws *WasmSnapshotter) Restore( return snapshot.SnapshotItem{}, snapshot.ErrUnknownFormat } +func (ws *WasmSnapshotter) PruneSnapshotHeight(height int64) { + // nothing to do +} + +func (ws *WasmSnapshotter) SetSnapshotInterval(snapshotInterval uint64) { + // +} + func restoreV1(ctx sdk.Context, k *Keeper, compressedCode []byte) error { if !ioutils.IsGzip(compressedCode) { return types.ErrInvalid.Wrap("not a gzip") diff --git a/x/wasm/keeper/snapshotter_integration_test.go b/x/wasm/keeper/snapshotter_integration_test.go index 432d56c79d..202a5a843d 100644 --- a/x/wasm/keeper/snapshotter_integration_test.go +++ b/x/wasm/keeper/snapshotter_integration_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" + "github.com/CosmWasm/wasmd/x/wasm/keeper" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" @@ -20,7 +21,6 @@ import ( tmtypes "github.com/tendermint/tendermint/types" "github.com/CosmWasm/wasmd/app" - "github.com/CosmWasm/wasmd/x/wasm/keeper" ) func TestSnapshotter(t *testing.T) { diff --git a/x/wasm/keeper/staking_test.go b/x/wasm/keeper/staking_test.go index 23ca71819b..755520055c 100644 --- a/x/wasm/keeper/staking_test.go +++ b/x/wasm/keeper/staking_test.go @@ -16,7 +16,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -129,10 +128,10 @@ func TestInitializeStaking(t *testing.T) { require.NotEmpty(t, stakingAddr) // nothing spent here - checkAccount(t, ctx, accKeeper, bankKeeper, creator, deposit) + CheckAccount(t, ctx, accKeeper, bankKeeper, creator, deposit) // try to register with a validator not on the list and it fails - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() badInitMsg := StakingInitMsg{ Name: "Missing Validator", Symbol: "MISS", @@ -183,7 +182,7 @@ func initializeStaking(t *testing.T) initInfo { v, found := stakingKeeper.GetValidator(ctx, valAddr) assert.True(t, found) assert.Equal(t, v.GetDelegatorShares(), sdk.NewDec(1000000)) - assert.Equal(t, v.Status, stakingtypes.Bonded) + assert.Equal(t, v.Status, types.Bonded) deposit := sdk.NewCoins(sdk.NewInt64Coin("denom", 100000), sdk.NewInt64Coin("stake", 500000)) creator := k.Faucet.NewFundedRandomAccount(ctx, deposit...) @@ -255,8 +254,8 @@ func TestBonding(t *testing.T) { require.NoError(t, err) // check some account values - the money is on neither account (cuz it is bonded) - checkAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.Coins{}) - checkAccount(t, ctx, accKeeper, bankKeeper, bob, funds) + CheckAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.Coins{}) + CheckAccount(t, ctx, accKeeper, bankKeeper, bob, funds) // make sure the proper number of tokens have been bonded val, _ = stakingKeeper.GetValidator(ctx, valAddr) @@ -313,8 +312,8 @@ func TestUnbonding(t *testing.T) { // check some account values - the money is on neither account (cuz it is bonded) // Note: why is this immediate? just test setup? - checkAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.Coins{}) - checkAccount(t, ctx, accKeeper, bankKeeper, bob, funds) + CheckAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.Coins{}) + CheckAccount(t, ctx, accKeeper, bankKeeper, bob, funds) // make sure the proper number of tokens have been bonded (80k - 27k = 53k) val, _ = stakingKeeper.GetValidator(ctx, valAddr) @@ -382,8 +381,8 @@ func TestReinvest(t *testing.T) { // check some account values - the money is on neither account (cuz it is bonded) // Note: why is this immediate? just test setup? - checkAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.Coins{}) - checkAccount(t, ctx, accKeeper, bankKeeper, bob, funds) + CheckAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.Coins{}) + CheckAccount(t, ctx, accKeeper, bankKeeper, bob, funds) // check the delegation itself d, found := stakingKeeper.GetDelegation(ctx, contractAddr, valAddr) @@ -660,7 +659,7 @@ func addValidator(t *testing.T, ctx sdk.Context, stakingKeeper stakingkeeper.Kee pkAny, err := codectypes.NewAnyWithValue(pubKey) require.NoError(t, err) - msg := stakingtypes.MsgCreateValidator{ + msg := types.MsgCreateValidator{ Description: types.Description{ Moniker: "Validator power", }, @@ -676,8 +675,8 @@ func addValidator(t *testing.T, ctx sdk.Context, stakingKeeper stakingkeeper.Kee Value: value, } - h := staking.NewHandler(stakingKeeper) - _, err = h(ctx, &msg) + h := stakingkeeper.NewMsgServerImpl(stakingKeeper) + _, err = h.CreateValidator(ctx, &msg) require.NoError(t, err) return addr } diff --git a/x/wasm/keeper/submsg_test.go b/x/wasm/keeper/submsg_test.go index cd2555fef7..c41e74cdee 100644 --- a/x/wasm/keeper/submsg_test.go +++ b/x/wasm/keeper/submsg_test.go @@ -27,8 +27,8 @@ func TestDispatchSubMsgSuccessCase(t *testing.T) { contractStart := sdk.NewCoins(sdk.NewInt64Coin("denom", 40000)) creator := keepers.Faucet.NewFundedRandomAccount(ctx, deposit...) - creatorBalance := deposit.Sub(contractStart) - _, _, fred := keyPubAddr() + creatorBalance := deposit.Sub(contractStart...) + _, _, fred := KeyPubAddr() // upload code codeID, _, err := keepers.ContractKeeper.Create(ctx, creator, testdata.ReflectContractWasm(), nil) @@ -41,9 +41,9 @@ func TestDispatchSubMsgSuccessCase(t *testing.T) { require.NotEmpty(t, contractAddr) // check some account values - checkAccount(t, ctx, accKeeper, bankKeeper, contractAddr, contractStart) - checkAccount(t, ctx, accKeeper, bankKeeper, creator, creatorBalance) - checkAccount(t, ctx, accKeeper, bankKeeper, fred, nil) + CheckAccount(t, ctx, accKeeper, bankKeeper, contractAddr, contractStart) + CheckAccount(t, ctx, accKeeper, bankKeeper, creator, creatorBalance) + CheckAccount(t, ctx, accKeeper, bankKeeper, fred, nil) // creator can send contract's tokens to fred (using SendMsg) msg := wasmvmtypes.CosmosMsg{ @@ -72,10 +72,10 @@ func TestDispatchSubMsgSuccessCase(t *testing.T) { require.NoError(t, err) // fred got coins - checkAccount(t, ctx, accKeeper, bankKeeper, fred, sdk.NewCoins(sdk.NewInt64Coin("denom", 15000))) + CheckAccount(t, ctx, accKeeper, bankKeeper, fred, sdk.NewCoins(sdk.NewInt64Coin("denom", 15000))) // contract lost them - checkAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.NewCoins(sdk.NewInt64Coin("denom", 25000))) - checkAccount(t, ctx, accKeeper, bankKeeper, creator, creatorBalance) + CheckAccount(t, ctx, accKeeper, bankKeeper, contractAddr, sdk.NewCoins(sdk.NewInt64Coin("denom", 25000))) + CheckAccount(t, ctx, accKeeper, bankKeeper, creator, creatorBalance) // query the reflect state to ensure the result was stored query := testdata.ReflectQueryMsg{ @@ -121,8 +121,8 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) { require.NoError(t, err) hackatomID, _, err := keepers.ContractKeeper.Create(ctx, uploader, hackatomCode, nil) require.NoError(t, err) - _, _, bob := keyPubAddr() - _, _, fred := keyPubAddr() + _, _, bob := KeyPubAddr() + _, _, fred := KeyPubAddr() initMsg := HackatomExampleInitMsg{ Verifier: fred, Beneficiary: bob, @@ -236,7 +236,7 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) { "send tokens": { submsgID: 5, msg: validBankSend, - resultAssertions: []assertion{assertReturnedEvents(0), assertGasUsed(95000, 96000)}, + resultAssertions: []assertion{assertReturnedEvents(0), assertGasUsed(95000, 104000)}, }, "not enough tokens": { submsgID: 6, @@ -256,7 +256,7 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) { msg: validBankSend, gasLimit: &subGasLimit, // uses same gas as call without limit (note we do not charge the 40k on reply) - resultAssertions: []assertion{assertReturnedEvents(0), assertGasUsed(95000, 96000)}, + resultAssertions: []assertion{assertReturnedEvents(0), assertGasUsed(95000, 104000)}, }, "not enough tokens with limit": { submsgID: 16, @@ -283,7 +283,7 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) { for name, tc := range cases { t.Run(name, func(t *testing.T) { creator := keepers.Faucet.NewFundedRandomAccount(ctx, contractStart...) - _, _, empty := keyPubAddr() + _, _, empty := KeyPubAddr() contractAddr, _, err := keepers.ContractKeeper.Instantiate(ctx, reflectID, creator, nil, []byte("{}"), fmt.Sprintf("contract %s", name), contractStart) require.NoError(t, err) @@ -367,7 +367,7 @@ func TestDispatchSubMsgEncodeToNoSdkMsg(t *testing.T) { contractStart := sdk.NewCoins(sdk.NewInt64Coin("denom", 40000)) creator := keepers.Faucet.NewFundedRandomAccount(ctx, deposit...) - _, _, fred := keyPubAddr() + _, _, fred := KeyPubAddr() // upload code codeID, _, err := keepers.ContractKeeper.Create(ctx, creator, testdata.ReflectContractWasm(), nil) @@ -433,7 +433,7 @@ func TestDispatchSubMsgConditionalReplyOn(t *testing.T) { contractStart := sdk.NewCoins(sdk.NewInt64Coin("denom", 40000)) creator := keepers.Faucet.NewFundedRandomAccount(ctx, deposit...) - _, _, fred := keyPubAddr() + _, _, fred := KeyPubAddr() // upload code codeID, _, err := keepers.ContractKeeper.Create(ctx, creator, testdata.ReflectContractWasm(), nil) @@ -501,7 +501,7 @@ func TestDispatchSubMsgConditionalReplyOn(t *testing.T) { }, } - var id uint64 = 0 + var id uint64 for name, tc := range cases { id++ t.Run(name, func(t *testing.T) { diff --git a/x/wasm/keeper/test_common.go b/x/wasm/keeper/test_common.go index b84e0025a3..f234aface7 100644 --- a/x/wasm/keeper/test_common.go +++ b/x/wasm/keeper/test_common.go @@ -13,6 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/std" "github.com/cosmos/cosmos-sdk/store" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -38,8 +39,11 @@ import ( evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" "github.com/cosmos/cosmos-sdk/x/feegrant" "github.com/cosmos/cosmos-sdk/x/gov" + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/mint" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/cosmos/cosmos-sdk/x/params" @@ -56,11 +60,11 @@ import ( upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/v4/modules/apps/transfer" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v4/modules/core" - ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" + "github.com/cosmos/ibc-go/v6/modules/apps/transfer" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v6/modules/core" + ibchost "github.com/cosmos/ibc-go/v6/modules/core/24-host" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" @@ -81,9 +85,9 @@ var moduleBasics = module.NewBasicManager( staking.AppModuleBasic{}, mint.AppModuleBasic{}, distribution.AppModuleBasic{}, - gov.NewAppModuleBasic( - paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, - ), + gov.NewAppModuleBasic([]govclient.ProposalHandler{ + paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, + }), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, @@ -121,6 +125,7 @@ var TestingStakeParams = stakingtypes.Params{ MaxEntries: 10, HistoricalEntries: 10, BondDenom: "stake", + MinCommissionRate: sdk.NewDecWithPrec(10, 2), } type TestFaucet struct { @@ -134,7 +139,7 @@ type TestFaucet struct { func NewTestFaucet(t testing.TB, ctx sdk.Context, bankKeeper bankkeeper.Keeper, minterModuleName string, initialAmount ...sdk.Coin) *TestFaucet { require.NotEmpty(t, initialAmount) r := &TestFaucet{t: t, bankKeeper: bankKeeper, minterModuleName: minterModuleName} - _, _, addr := keyPubAddr() + _, _, addr := KeyPubAddr() r.sender = addr r.Mint(ctx, addr, initialAmount...) r.balance = initialAmount @@ -160,11 +165,11 @@ func (f *TestFaucet) Fund(parentCtx sdk.Context, receiver sdk.AccAddress, amount ctx := parentCtx.WithEventManager(sdk.NewEventManager()) // discard all faucet related events err := f.bankKeeper.SendCoins(ctx, f.sender, receiver, amounts) require.NoError(f.t, err) - f.balance = f.balance.Sub(amounts) + f.balance = f.balance.Sub(amounts...) } func (f *TestFaucet) NewFundedRandomAccount(ctx sdk.Context, amounts ...sdk.Coin) sdk.AccAddress { - _, _, addr := keyPubAddr() + _, _, addr := KeyPubAddr() f.Fund(ctx, addr, amounts...) return addr } @@ -178,7 +183,7 @@ type TestKeepers struct { ContractKeeper types.ContractOpsKeeper WasmKeeper *Keeper IBCKeeper *ibckeeper.Keeper - Router *baseapp.Router + Router *baseapp.MsgServiceRouter EncodingConfig wasmappparams.EncodingConfig Faucet *TestFaucet MultiStore sdk.CommitMultiStore @@ -217,16 +222,16 @@ func createTestInput( ) ms := store.NewCommitMultiStore(db) for _, v := range keys { - ms.MountStoreWithDB(v, sdk.StoreTypeIAVL, db) + ms.MountStoreWithDB(v, storetypes.StoreTypeIAVL, db) } tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) for _, v := range tkeys { - ms.MountStoreWithDB(v, sdk.StoreTypeTransient, db) + ms.MountStoreWithDB(v, storetypes.StoreTypeTransient, db) } memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) for _, v := range memKeys { - ms.MountStoreWithDB(v, sdk.StoreTypeMemory, db) + ms.MountStoreWithDB(v, storetypes.StoreTypeMemory, db) } require.NoError(t, ms.LoadLatestVersion()) @@ -283,6 +288,7 @@ func createTestInput( subspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, // prototype maccPerms, + sdk.GetConfig().GetBech32AccountAddrPrefix(), ) blockedAddrs := make(map[string]bool) for acc := range maccPerms { @@ -315,7 +321,6 @@ func createTestInput( bankKeeper, stakingKeeper, authtypes.FeeCollectorName, - nil, ) distKeeper.SetParams(ctx, distributiontypes.DefaultParams()) stakingKeeper.SetHooks(distKeeper.Hooks()) @@ -329,6 +334,7 @@ func createTestInput( appCodec, tempDir, nil, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) faucet := NewTestFaucet(t, ctx, bankKeeper, minttypes.ModuleName, sdk.NewCoin("stake", sdk.NewInt(100_000_000_000))) @@ -356,13 +362,12 @@ func createTestInput( scopedIBCKeeper, ) - router := baseapp.NewRouter() - bh := bank.NewHandler(bankKeeper) - router.AddRoute(sdk.NewRoute(banktypes.RouterKey, bh)) - sh := staking.NewHandler(stakingKeeper) - router.AddRoute(sdk.NewRoute(stakingtypes.RouterKey, sh)) - dh := distribution.NewHandler(distKeeper) - router.AddRoute(sdk.NewRoute(distributiontypes.RouterKey, dh)) + router := baseapp.NewMsgServiceRouter() + router.SetInterfaceRegistry(encodingConfig.InterfaceRegistry) + + banktypes.RegisterMsgServer(router, bankkeeper.NewMsgServerImpl(bankKeeper)) + stakingtypes.RegisterMsgServer(router, stakingkeeper.NewMsgServerImpl(stakingKeeper)) + distributiontypes.RegisterMsgServer(router, distributionkeeper.NewMsgServerImpl(distKeeper)) querier := baseapp.NewGRPCQueryRouter() querier.SetInterfaceRegistry(encodingConfig.InterfaceRegistry) @@ -394,7 +399,7 @@ func createTestInput( keeper.SetParams(ctx, types.DefaultParams()) // add wasm handler so we can loop-back (contracts calling contracts) contractKeeper := NewDefaultPermissionKeeper(&keeper) - router.AddRoute(sdk.NewRoute(types.RouterKey, TestHandler(contractKeeper))) + types.RegisterMsgServer(router, NewMsgServerImpl(contractKeeper)) am := module.NewManager( // minimal module set that we use for message/ query tests bank.NewAppModule(appCodec, bankKeeper, accountKeeper), @@ -405,26 +410,36 @@ func createTestInput( types.RegisterMsgServer(msgRouter, NewMsgServerImpl(NewDefaultPermissionKeeper(keeper))) types.RegisterQueryServer(querier, NewGrpcQuerier(appCodec, keys[types.ModuleName], keeper, keeper.queryGasLimit)) - govRouter := govtypes.NewRouter(). - AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). + govRouter := govv1beta1.NewRouter(). + AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(paramsKeeper)). AddRoute(distributiontypes.RouterKey, distribution.NewCommunityPoolSpendProposalHandler(distKeeper)). AddRoute(types.RouterKey, NewWasmProposalHandler(&keeper, types.EnableAllProposals)) + govConfig := govtypes.DefaultConfig() + /* + Example of setting gov params: + govConfig.MaxMetadataLen = 10000 + */ govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], - subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()), + subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()), accountKeeper, bankKeeper, stakingKeeper, govRouter, + router, + govConfig, ) - govKeeper.SetProposalID(ctx, govtypes.DefaultStartingProposalID) - govKeeper.SetDepositParams(ctx, govtypes.DefaultDepositParams()) - govKeeper.SetVotingParams(ctx, govtypes.DefaultVotingParams()) - govKeeper.SetTallyParams(ctx, govtypes.DefaultTallyParams()) + govv1.RegisterMsgServer(router, govkeeper.NewMsgServerImpl(govKeeper)) + govv1beta1.RegisterQueryServer(querier, govkeeper.NewLegacyQueryServer(govKeeper)) + + govKeeper.SetProposalID(ctx, govv1beta1.DefaultStartingProposalID) + govKeeper.SetDepositParams(ctx, govv1.DefaultDepositParams()) + govKeeper.SetVotingParams(ctx, govv1.DefaultVotingParams()) + govKeeper.SetTallyParams(ctx, govv1.DefaultTallyParams()) keepers := TestKeepers{ AccountKeeper: accountKeeper, @@ -522,7 +537,7 @@ func handleExecute(ctx sdk.Context, k types.ContractOpsKeeper, msg *types.MsgExe } func RandomAccountAddress(_ testing.TB) sdk.AccAddress { - _, _, addr := keyPubAddr() + _, _, addr := KeyPubAddr() return addr } @@ -561,7 +576,7 @@ func StoreReflectContract(t testing.TB, ctx sdk.Context, keepers TestKeepers) Ex func StoreExampleContract(t testing.TB, ctx sdk.Context, keepers TestKeepers, wasmFile string) ExampleContract { anyAmount := sdk.NewCoins(sdk.NewInt64Coin("denom", 1000)) - creator, _, creatorAddr := keyPubAddr() + creator, _, creatorAddr := KeyPubAddr() fundAccounts(t, ctx, keepers.AccountKeeper, keepers.BankKeeper, creatorAddr, anyAmount) wasmCode, err := os.ReadFile(wasmFile) @@ -605,7 +620,7 @@ func StoreRandomContractWithAccessConfig( ) ExampleContract { t.Helper() anyAmount := sdk.NewCoins(sdk.NewInt64Coin("denom", 1000)) - creator, _, creatorAddr := keyPubAddr() + creator, _, creatorAddr := KeyPubAddr() fundAccounts(t, ctx, keepers.AccountKeeper, keepers.BankKeeper, creatorAddr, anyAmount) keepers.WasmKeeper.wasmVM = mock wasmCode := append(wasmIdent, rand.Bytes(10)...) //nolint:gocritic @@ -630,10 +645,10 @@ type HackatomExampleInstance struct { func InstantiateHackatomExampleContract(t testing.TB, ctx sdk.Context, keepers TestKeepers) HackatomExampleInstance { contract := StoreHackatomExampleContract(t, ctx, keepers) - verifier, _, verifierAddr := keyPubAddr() + verifier, _, verifierAddr := KeyPubAddr() fundAccounts(t, ctx, keepers.AccountKeeper, keepers.BankKeeper, verifierAddr, contract.InitialAmount) - beneficiary, _, beneficiaryAddr := keyPubAddr() + beneficiary, _, beneficiaryAddr := KeyPubAddr() initMsgBz := HackatomExampleInitMsg{ Verifier: verifierAddr, Beneficiary: beneficiaryAddr, @@ -747,7 +762,7 @@ var keyCounter uint64 // we need to make this deterministic (same every test run), as encoded address size and thus gas cost, // depends on the actual bytes (due to ugly CanonicalAddress encoding) -func keyPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { +func KeyPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { keyCounter++ seed := make([]byte, 8) binary.BigEndian.PutUint64(seed, keyCounter) diff --git a/x/wasm/keeper/test_fuzz.go b/x/wasm/keeper/test_fuzz.go index d6a2ce870d..6e1a3469bb 100644 --- a/x/wasm/keeper/test_fuzz.go +++ b/x/wasm/keeper/test_fuzz.go @@ -51,10 +51,12 @@ func FuzzContractCodeHistory(m *types.ContractCodeHistoryEntry, c fuzz.Continue) func FuzzStateModel(m *types.Model, c fuzz.Continue) { m.Key = tmBytes.HexBytes(c.RandString()) - if len(m.Key) == 0 { - m.Key = tmBytes.HexBytes("non empty key") + if len(m.Key) != 0 { + c.Fuzz(&m.Value) + return } - c.Fuzz(&m.Value) + // try again, keys must not be empty + FuzzStateModel(m, c) } func FuzzAccessType(m *types.AccessType, c fuzz.Continue) { diff --git a/x/wasm/keeper/wasmtesting/mock_keepers.go b/x/wasm/keeper/wasmtesting/mock_keepers.go index 5977db1c80..ecaa2a270a 100644 --- a/x/wasm/keeper/wasmtesting/mock_keepers.go +++ b/x/wasm/keeper/wasmtesting/mock_keepers.go @@ -1,18 +1,17 @@ package wasmtesting import ( + "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v4/modules/core/exported" - - "github.com/CosmWasm/wasmd/x/wasm/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" ) type MockChannelKeeper struct { GetChannelFn func(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetNextSequenceSendFn func(ctx sdk.Context, portID, channelID string) (uint64, bool) - SendPacketFn func(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error + SendPacketFn func(ctx sdk.Context, channelCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (uint64, error) ChanCloseInitFn func(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error GetAllChannelsFn func(ctx sdk.Context) []channeltypes.IdentifiedChannel IterateChannelsFn func(ctx sdk.Context, cb func(channeltypes.IdentifiedChannel) bool) @@ -40,11 +39,11 @@ func (m *MockChannelKeeper) GetNextSequenceSend(ctx sdk.Context, portID, channel return m.GetNextSequenceSendFn(ctx, portID, channelID) } -func (m *MockChannelKeeper) SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error { +func (m *MockChannelKeeper) SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (uint64, error) { if m.SendPacketFn == nil { panic("not supposed to be called!") } - return m.SendPacketFn(ctx, channelCap, packet) + return m.SendPacketFn(ctx, channelCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) } func (m *MockChannelKeeper) ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error { diff --git a/x/wasm/module.go b/x/wasm/module.go index cc83cf831f..00d261d4d6 100644 --- a/x/wasm/module.go +++ b/x/wasm/module.go @@ -17,14 +17,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cast" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" "github.com/CosmWasm/wasmd/x/wasm/client/cli" - "github.com/CosmWasm/wasmd/x/wasm/client/rest" //nolint:staticcheck "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/CosmWasm/wasmd/x/wasm/simulation" "github.com/CosmWasm/wasmd/x/wasm/types" @@ -45,7 +43,7 @@ const ( // AppModuleBasic defines the basic application module used by the wasm module. type AppModuleBasic struct{} -func (b AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino) { //nolint:staticcheck +func (b AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino) { RegisterCodec(amino) } @@ -79,11 +77,6 @@ func (b AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, config client return ValidateGenesis(data) } -// RegisterRESTRoutes registers the REST routes for the wasm module. -func (AppModuleBasic) RegisterRESTRoutes(cliCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(cliCtx, rtr) -} - // GetTxCmd returns the root tx command for the wasm module. func (b AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd() @@ -146,7 +139,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } } -func (am AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier { //nolint:staticcheck +func (am AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier { return keeper.NewLegacyQuerier(am.keeper, am.keeper.QueryGasLimit()) } @@ -201,8 +194,8 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // ProposalContents doesn't return any content functions for governance proposals. -func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { - return simulation.ProposalContents(am.bankKeeper, am.keeper) +func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { + return nil } // RandomizedParams creates randomized bank param changes for the simulator. diff --git a/x/wasm/module_integration_test.go b/x/wasm/module_integration_test.go index bdce6cf34f..99dd930571 100644 --- a/x/wasm/module_integration_test.go +++ b/x/wasm/module_integration_test.go @@ -15,14 +15,15 @@ import ( ) func TestModuleMigrations(t *testing.T) { - wasmApp := app.Setup(false) + wasmApp := app.SetupWasmAppWithValSet(t) ctx := wasmApp.BaseApp.NewContext(false, tmproto.Header{}) - upgradeHandler := func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + upgradeHandler := func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { //nolint:unparam return wasmApp.ModuleManager().RunMigrations(ctx, wasmApp.ModuleConfigurator(), fromVM) } fromVM := wasmApp.UpgradeKeeper.GetModuleVersionMap(ctx) fromVM[wasm.ModuleName] = 1 // start with initial version - upgradeHandler(ctx, upgradetypes.Plan{Name: "testing"}, fromVM) + _, err := upgradeHandler(ctx, upgradetypes.Plan{Name: "testing"}, fromVM) + require.NoError(t, err) // when gotVM, err := wasmApp.ModuleManager().RunMigrations(ctx, wasmApp.ModuleConfigurator(), fromVM) // then diff --git a/x/wasm/module_test.go b/x/wasm/module_test.go index 5ca0a88178..e289b0a9a8 100644 --- a/x/wasm/module_test.go +++ b/x/wasm/module_test.go @@ -50,7 +50,7 @@ func setupTest(t *testing.T) testData { return data } -func keyPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { +func KeyPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { key := ed25519.GenPrivKey() pub := key.PubKey() addr := sdk.AccAddress(pub.Address()) @@ -66,7 +66,7 @@ func mustLoad(path string) []byte { } var ( - _, _, addrAcc1 = keyPubAddr() + _, _, addrAcc1 = KeyPubAddr() addr1 = addrAcc1.String() testContract = mustLoad("./keeper/testdata/hackatom.wasm") maskContract = testdata.ReflectContractWasm() @@ -159,8 +159,8 @@ func TestHandleInstantiate(t *testing.T) { require.NoError(t, err) assertStoreCodeResponse(t, res.Data, 1) - _, _, bob := keyPubAddr() - _, _, fred := keyPubAddr() + _, _, bob := KeyPubAddr() + _, _, fred := KeyPubAddr() initMsg := initMsg{ Verifier: fred, @@ -222,7 +222,7 @@ func TestHandleExecute(t *testing.T) { require.NoError(t, err) assertStoreCodeResponse(t, res.Data, 1) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := initMsg{ Verifier: fred, Beneficiary: bob, @@ -354,10 +354,10 @@ func TestHandleExecuteEscrow(t *testing.T) { Sender: creator.String(), WASMByteCode: testContract, } - res, err := h(data.ctx, msg) + _, err := h(data.ctx, msg) require.NoError(t, err) - _, _, bob := keyPubAddr() + _, _, bob := KeyPubAddr() initMsg := map[string]interface{}{ "verifier": fred.String(), "beneficiary": bob.String(), @@ -372,7 +372,7 @@ func TestHandleExecuteEscrow(t *testing.T) { Funds: deposit, Label: "testing", } - res, err = h(data.ctx, &initCmd) + res, err := h(data.ctx, &initCmd) require.NoError(t, err) contractBech32Addr := parseInitResponse(t, res.Data) require.Equal(t, "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr", contractBech32Addr) @@ -514,7 +514,7 @@ func assertCodeList(t *testing.T, q sdk.Querier, ctx sdk.Context, expectedNum in assert.Equal(t, expectedNum, len(res)) } -func assertCodeBytes(t *testing.T, q sdk.Querier, ctx sdk.Context, codeID uint64, expectedBytes []byte) { +func assertCodeBytes(t *testing.T, q sdk.Querier, ctx sdk.Context, codeID uint64, expectedBytes []byte) { //nolint:unparam path := []string{QueryGetCode, fmt.Sprintf("%d", codeID)} bz, sdkerr := q(ctx, path, abci.RequestQuery{}) require.NoError(t, sdkerr) @@ -534,7 +534,7 @@ func assertCodeBytes(t *testing.T, q sdk.Querier, ctx sdk.Context, codeID uint64 assert.EqualValues(t, codeID, res["id"]) } -func assertContractList(t *testing.T, q sdk.Querier, ctx sdk.Context, codeID uint64, expContractAddrs []string) { +func assertContractList(t *testing.T, q sdk.Querier, ctx sdk.Context, codeID uint64, expContractAddrs []string) { //nolint:unparam bz, sdkerr := q(ctx, []string{QueryListContractByCode, fmt.Sprintf("%d", codeID)}, abci.RequestQuery{}) require.NoError(t, sdkerr) @@ -548,7 +548,7 @@ func assertContractList(t *testing.T, q sdk.Querier, ctx sdk.Context, codeID uin require.NoError(t, err) hasAddrs := make([]string, len(res)) - for i, r := range res { + for i, r := range res { //nolint:gosimple hasAddrs[i] = r } @@ -572,7 +572,7 @@ func assertContractState(t *testing.T, q sdk.Querier, ctx sdk.Context, contractB assert.Equal(t, expectedBz, res[0].Value) } -func assertContractInfo(t *testing.T, q sdk.Querier, ctx sdk.Context, contractBech32Addr string, codeID uint64, creator sdk.AccAddress) { +func assertContractInfo(t *testing.T, q sdk.Querier, ctx sdk.Context, contractBech32Addr string, codeID uint64, creator sdk.AccAddress) { //nolint:unparam t.Helper() path := []string{QueryGetContract, contractBech32Addr} bz, sdkerr := q(ctx, path, abci.RequestQuery{}) diff --git a/x/wasm/relay_pingpong_test.go b/x/wasm/relay_pingpong_test.go index a36cdce6ab..3820835c54 100644 --- a/x/wasm/relay_pingpong_test.go +++ b/x/wasm/relay_pingpong_test.go @@ -5,15 +5,14 @@ import ( "fmt" "testing" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - ibctesting "github.com/cosmos/ibc-go/v4/testing" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -199,20 +198,6 @@ var ( // store keys maxValueKey = []byte("max-value") ) -func (p player) loadEndpoints(store prefix.Store, channelID string) *connectedChannelsModel { - var counterparties []connectedChannelsModel - if bz := store.Get(ibcEndpointsKey); bz != nil { - require.NoError(p.t, json.Unmarshal(bz, &counterparties)) - } - for _, v := range counterparties { - if v.Our.ChannelID == channelID { - return &v - } - } - p.t.Fatalf("no counterparty found for channel %q", channelID) - return nil -} - func (p player) storeEndpoint(store wasmvm.KVStore, channel wasmvmtypes.IBCChannel) { var counterparties []connectedChannelsModel if b := store.Get(ibcEndpointsKey); b != nil { @@ -240,7 +225,7 @@ var ( // store keys func (p player) IBCPacketReceive(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketReceiveMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCReceiveResult, uint64, error) { // parse received data and store packet := msg.Packet - var receivedBall hit + var receivedBall Hit if err := json.Unmarshal(packet.Data, &receivedBall); err != nil { return &wasmvmtypes.IBCReceiveResult{ Ok: &wasmvmtypes.IBCReceiveResponse{ @@ -285,7 +270,7 @@ func (p player) IBCPacketReceive(codeID wasmvm.Checksum, env wasmvmtypes.Env, ms // OnIBCPacketAcknowledgement handles the packet acknowledgment frame. Stops the game on an any error func (p player) IBCPacketAck(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { // parse received data and store - var sentBall hit + var sentBall Hit if err := json.Unmarshal(msg.OriginalPacket.Data, &sentBall); err != nil { return nil, 0, err } @@ -337,15 +322,15 @@ func counterParty(s string) string { } // hit is ibc packet payload -type hit map[string]uint64 +type Hit map[string]uint64 -func NewHit(player string, count uint64) hit { +func NewHit(player string, count uint64) Hit { return map[string]uint64{ player: count, } } -func (h hit) GetBytes() []byte { +func (h Hit) GetBytes() []byte { b, err := json.Marshal(h) if err != nil { panic(err) @@ -353,22 +338,22 @@ func (h hit) GetBytes() []byte { return b } -func (h hit) String() string { +func (h Hit) String() string { return fmt.Sprintf("Ball %s", string(h.GetBytes())) } -func (h hit) BuildAck() hitAcknowledgement { +func (h Hit) BuildAck() hitAcknowledgement { return hitAcknowledgement{Success: &h} } -func (h hit) BuildError(errMsg string) hitAcknowledgement { +func (h Hit) BuildError(errMsg string) hitAcknowledgement { return hitAcknowledgement{Error: errMsg} } // hitAcknowledgement is ibc acknowledgment payload type hitAcknowledgement struct { Error string `json:"error,omitempty"` - Success *hit `json:"success,omitempty"` + Success *Hit `json:"success,omitempty"` } func (a hitAcknowledgement) GetBytes() []byte { diff --git a/x/wasm/relay_test.go b/x/wasm/relay_test.go index df34534fbc..51d5443c84 100644 --- a/x/wasm/relay_test.go +++ b/x/wasm/relay_test.go @@ -6,14 +6,15 @@ import ( "testing" "time" + sdkerrors "cosmossdk.io/errors" + "cosmossdk.io/math" wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v4/testing" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v6/testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -33,8 +34,8 @@ func TestFromIBCTransferToContract(t *testing.T) { specs := map[string]struct { contract wasmtesting.IBCContractCallbacks setupContract func(t *testing.T, contract wasmtesting.IBCContractCallbacks, chain *wasmibctesting.TestChain) - expChainABalanceDiff sdk.Int - expChainBBalanceDiff sdk.Int + expChainABalanceDiff math.Int + expChainBBalanceDiff math.Int }{ "ack": { contract: &ackReceiverContract{}, @@ -100,7 +101,7 @@ func TestFromIBCTransferToContract(t *testing.T) { // when transfer via sdk transfer from A (module) -> B (contract) coinToSendToB := sdk.NewCoin(sdk.DefaultBondDenom, transferAmount) timeoutHeight := clienttypes.NewHeight(1, 110) - msg := ibctransfertypes.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, coinToSendToB, chainA.SenderAccount.GetAddress().String(), chainB.SenderAccount.GetAddress().String(), timeoutHeight, 0) + msg := ibctransfertypes.NewMsgTransfer(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, coinToSendToB, chainA.SenderAccount.GetAddress().String(), chainB.SenderAccount.GetAddress().String(), timeoutHeight, 0, "") _, err := chainA.SendMsgs(msg) require.NoError(t, err) require.NoError(t, path.EndpointB.UpdateClient()) @@ -583,7 +584,7 @@ func (s *sendEmulatedIBCTransferContract) Execute(code wasmvm.Checksum, env wasm require.Equal(s.t, in.CoinsToSend.Amount.String(), info.Funds[0].Amount) require.Equal(s.t, in.CoinsToSend.Denom, info.Funds[0].Denom) dataPacket := ibctransfertypes.NewFungibleTokenPacketData( - in.CoinsToSend.Denom, in.CoinsToSend.Amount.String(), info.Sender, in.ReceiverAddr, + in.CoinsToSend.Denom, in.CoinsToSend.Amount.String(), info.Sender, in.ReceiverAddr, "", ) if err := dataPacket.ValidateBasic(); err != nil { return nil, 0, err @@ -599,7 +600,7 @@ func (s *sendEmulatedIBCTransferContract) Execute(code wasmvm.Checksum, env wasm return &wasmvmtypes.Response{Messages: []wasmvmtypes.SubMsg{{ReplyOn: wasmvmtypes.ReplyNever, Msg: wasmvmtypes.CosmosMsg{IBC: ibcMsg}}}}, 0, nil } -func (c *sendEmulatedIBCTransferContract) IBCPacketTimeout(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (s *sendEmulatedIBCTransferContract) IBCPacketTimeout(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { packet := msg.Packet var data ibctransfertypes.FungibleTokenPacketData @@ -625,14 +626,13 @@ var _ wasmtesting.IBCContractCallbacks = &closeChannelContract{} type closeChannelContract struct { contractStub - t *testing.T } func (c *closeChannelContract) IBCChannelClose(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { return &wasmvmtypes.IBCBasicResponse{}, 1, nil } -func (s *closeChannelContract) Execute(code wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { +func (c *closeChannelContract) Execute(code wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { var in closeIBCChannel if err := json.Unmarshal(executeMsg, &in); err != nil { return nil, 0, err diff --git a/x/wasm/simulation/operations.go b/x/wasm/simulation/operations.go index 34e7ef35d5..13c2f01670 100644 --- a/x/wasm/simulation/operations.go +++ b/x/wasm/simulation/operations.go @@ -27,9 +27,6 @@ const ( OpWeightMsgStoreCode = "op_weight_msg_store_code" OpWeightMsgInstantiateContract = "op_weight_msg_instantiate_contract" OpWeightMsgExecuteContract = "op_weight_msg_execute_contract" - OpWeightMsgUpdateAdmin = "op_weight_msg_update_admin" - OpWeightMsgClearAdmin = "op_weight_msg_clear_admin" - OpWeightMsgMigrateContract = "op_weight_msg_migrate_contract" OpReflectContractPath = "op_reflect_contract_path" ) @@ -57,9 +54,6 @@ func WeightedOperations( weightMsgStoreCode int weightMsgInstantiateContract int weightMsgExecuteContract int - weightMsgUpdateAdmin int - weightMsgClearAdmin int - weightMsgMigrateContract int wasmContractPath string ) @@ -68,6 +62,7 @@ func WeightedOperations( weightMsgStoreCode = params.DefaultWeightMsgStoreCode }, ) + simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgInstantiateContract, &weightMsgInstantiateContract, nil, func(_ *rand.Rand) { weightMsgInstantiateContract = params.DefaultWeightMsgInstantiateContract @@ -78,21 +73,6 @@ func WeightedOperations( weightMsgExecuteContract = params.DefaultWeightMsgExecuteContract }, ) - simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgUpdateAdmin, &weightMsgUpdateAdmin, nil, - func(_ *rand.Rand) { - weightMsgUpdateAdmin = params.DefaultWeightMsgUpdateAdmin - }, - ) - simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgClearAdmin, &weightMsgClearAdmin, nil, - func(_ *rand.Rand) { - weightMsgClearAdmin = params.DefaultWeightMsgClearAdmin - }, - ) - simstate.AppParams.GetOrGenerate(simstate.Cdc, OpWeightMsgMigrateContract, &weightMsgMigrateContract, nil, - func(_ *rand.Rand) { - weightMsgMigrateContract = params.DefaultWeightMsgMigrateContract - }, - ) simstate.AppParams.GetOrGenerate(simstate.Cdc, OpReflectContractPath, &wasmContractPath, nil, func(_ *rand.Rand) { wasmContractPath = "" @@ -101,7 +81,7 @@ func WeightedOperations( var wasmBz []byte if wasmContractPath == "" { - wasmBz = testdata.MigrateReflectContractWasm() + wasmBz = testdata.ReflectContractWasm() } else { var err error wasmBz, err = os.ReadFile(wasmContractPath) @@ -130,194 +110,6 @@ func WeightedOperations( DefaultSimulationExecutePayloader, ), ), - simulation.NewWeightedOperation( - weightMsgUpdateAdmin, - SimulateMsgUpdateAmin( - ak, - bk, - wasmKeeper, - DefaultSimulationUpdateAdminContractSelector, - ), - ), - simulation.NewWeightedOperation( - weightMsgClearAdmin, - SimulateMsgClearAdmin( - ak, - bk, - wasmKeeper, - DefaultSimulationClearAdminContractSelector, - ), - ), - simulation.NewWeightedOperation( - weightMsgMigrateContract, - SimulateMsgMigrateContract( - ak, - bk, - wasmKeeper, - DefaultSimulationMigrateContractSelector, - DefaultSimulationMigrateCodeIDSelector, - ), - ), - } -} - -type ( - MsgMigrateContractSelector func(sdk.Context, WasmKeeper, string) (sdk.AccAddress, types.ContractInfo) - MsgMigrateCodeIDSelector func(sdk.Context, WasmKeeper, uint64) uint64 -) - -func DefaultSimulationMigrateContractSelector(ctx sdk.Context, wasmKeeper WasmKeeper, adminAddress string) (sdk.AccAddress, types.ContractInfo) { - var contractAddress sdk.AccAddress - var contractInfo types.ContractInfo - wasmKeeper.IterateContractInfo(ctx, func(address sdk.AccAddress, info types.ContractInfo) bool { - if info.Admin != adminAddress { - return false - } - contractAddress = address - contractInfo = info - return true - }) - return contractAddress, contractInfo -} - -func DefaultSimulationMigrateCodeIDSelector(ctx sdk.Context, wasmKeeper WasmKeeper, currentCodeID uint64) uint64 { - var codeID uint64 - wasmKeeper.IterateCodeInfos(ctx, func(u uint64, info types.CodeInfo) bool { - if (info.InstantiateConfig.Permission != types.AccessTypeEverybody) || (u == currentCodeID) { - return false - } - codeID = u - return true - }) - return codeID -} - -func SimulateMsgMigrateContract( - ak types.AccountKeeper, - bk BankKeeper, - wasmKeeper WasmKeeper, - contractSelector MsgMigrateContractSelector, - codeIDSelector MsgMigrateCodeIDSelector, -) simtypes.Operation { - return func( - r *rand.Rand, - app *baseapp.BaseApp, - ctx sdk.Context, - accs []simtypes.Account, - chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - ctAddress, info := contractSelector(ctx, wasmKeeper, simAccount.Address.String()) - if ctAddress == nil { - return simtypes.NoOpMsg(types.ModuleName, types.MsgMigrateContract{}.Type(), "no contract instance available"), nil, nil - } - - codeID := codeIDSelector(ctx, wasmKeeper, info.CodeID) - if codeID == 0 { - return simtypes.NoOpMsg(types.ModuleName, types.MsgMigrateContract{}.Type(), "no target contract available"), nil, nil - } - migrateMsg := types.MsgMigrateContract{ - Sender: simAccount.Address.String(), - Contract: ctAddress.String(), - CodeID: codeID, - Msg: []byte(`{}`), - } - - txCtx := BuildOperationInput(r, app, ctx, &migrateMsg, simAccount, ak, bk, nil) - return simulation.GenAndDeliverTxWithRandFees(txCtx) - } -} - -type MsgClearAdminContractSelector func(sdk.Context, WasmKeeper, string) sdk.AccAddress - -func DefaultSimulationClearAdminContractSelector(ctx sdk.Context, wasmKeeper WasmKeeper, adminAddress string) sdk.AccAddress { - var ctAddress sdk.AccAddress - wasmKeeper.IterateContractInfo(ctx, func(addr sdk.AccAddress, info types.ContractInfo) bool { - if info.Admin != adminAddress { - return false - } - ctAddress = addr - return true - }) - return ctAddress -} - -func SimulateMsgClearAdmin( - ak types.AccountKeeper, - bk BankKeeper, - wasmKeeper WasmKeeper, - contractSelector MsgClearAdminContractSelector, -) simtypes.Operation { - return func( - r *rand.Rand, - app *baseapp.BaseApp, - ctx sdk.Context, - accounts []simtypes.Account, - chainID string, - ) (OperationMsg simtypes.OperationMsg, futureOps []simtypes.FutureOperation, err error) { - simAccount, _ := simtypes.RandomAcc(r, accounts) - ctAddress := contractSelector(ctx, wasmKeeper, simAccount.Address.String()) - if ctAddress == nil { - return simtypes.NoOpMsg(types.ModuleName, types.MsgClearAdmin{}.Type(), "no contract instance available"), nil, nil - } - - msg := types.MsgClearAdmin{ - Sender: simAccount.Address.String(), - Contract: ctAddress.String(), - } - txCtx := BuildOperationInput(r, app, ctx, &msg, simAccount, ak, bk, nil) - return simulation.GenAndDeliverTxWithRandFees(txCtx) - } -} - -type MsgUpdateAdminContractSelector func(sdk.Context, WasmKeeper, string) (sdk.AccAddress, types.ContractInfo) - -// DefaultSimulationUpdateAdminContractSelector picks the first contract which Admin != "" -func DefaultSimulationUpdateAdminContractSelector(ctx sdk.Context, wasmKeeper WasmKeeper, adminAddress string) (sdk.AccAddress, types.ContractInfo) { - var contractAddress sdk.AccAddress - var contractInfo types.ContractInfo - wasmKeeper.IterateContractInfo(ctx, func(address sdk.AccAddress, info types.ContractInfo) bool { - if info.Admin != adminAddress { - return false - } - contractAddress = address - contractInfo = info - return true - }) - return contractAddress, contractInfo -} - -func SimulateMsgUpdateAmin( - ak types.AccountKeeper, - bk BankKeeper, - wasmKeeper WasmKeeper, - contractSelector MsgUpdateAdminContractSelector, -) simtypes.Operation { - return func( - r *rand.Rand, - app *baseapp.BaseApp, - ctx sdk.Context, - accs []simtypes.Account, - chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - ctAddress, _ := contractSelector(ctx, wasmKeeper, simAccount.Address.String()) - if ctAddress == nil { - return simtypes.NoOpMsg(types.ModuleName, types.MsgUpdateAdmin{}.Type(), "no contract instance available"), nil, nil - } - - newAdmin, _ := simtypes.RandomAcc(r, accs) - if newAdmin.Address.String() == simAccount.Address.String() { - return simtypes.NoOpMsg(types.ModuleName, types.MsgUpdateAdmin{}.Type(), "new admin cannot be the same as current admin"), nil, nil - } - - msg := types.MsgUpdateAdmin{ - Sender: simAccount.Address.String(), - NewAdmin: newAdmin.Address.String(), - Contract: ctAddress.String(), - } - txCtx := BuildOperationInput(r, app, ctx, &msg, simAccount, ak, bk, nil) - return simulation.GenAndDeliverTxWithRandFees(txCtx) } } @@ -388,11 +180,9 @@ func SimulateMsgInstantiateContract(ak types.AccountKeeper, bk BankKeeper, wasmK } } - adminAccount, _ := simtypes.RandomAcc(r, accs) - msg := types.MsgInstantiateContract{ Sender: simAccount.Address.String(), - Admin: adminAccount.Address.String(), + Admin: simtypes.RandomAccounts(r, 1)[0].Address.String(), CodeID: codeID, Label: simtypes.RandStringOfLength(r, 10), Msg: []byte(`{}`), diff --git a/x/wasm/simulation/sim_utils.go b/x/wasm/simulation/sim_utils.go index 4f9a00b0bf..a915670a13 100644 --- a/x/wasm/simulation/sim_utils.go +++ b/x/wasm/simulation/sim_utils.go @@ -15,7 +15,7 @@ func GenAndDeliverTxWithRandFees(txCtx simulation.OperationInput, gas uint64) (s 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 } @@ -30,7 +30,8 @@ func GenAndDeliverTxWithRandFees(txCtx simulation.OperationInput, gas uint64) (s // GenAndDeliverTx generates a transactions and delivers it. func GenAndDeliverTx(txCtx simulation.OperationInput, fees sdk.Coins, gas uint64) (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, @@ -44,7 +45,7 @@ func GenAndDeliverTx(txCtx simulation.OperationInput, fees sdk.Coins, gas uint64 return simtypes.NoOpMsg(txCtx.ModuleName, txCtx.MsgType, "unable to generate mock tx"), nil, err } - _, _, err = txCtx.App.Deliver(txCtx.TxGen.TxEncoder(), tx) + _, _, err = txCtx.App.SimDeliver(txCtx.TxGen.TxEncoder(), tx) if err != nil { return simtypes.NoOpMsg(txCtx.ModuleName, txCtx.MsgType, "unable to deliver tx"), nil, err } diff --git a/x/wasm/types/authz.go b/x/wasm/types/authz.go index 10dd2606c9..c8b1efcb04 100644 --- a/x/wasm/types/authz.go +++ b/x/wasm/types/authz.go @@ -472,7 +472,7 @@ func (m MaxFundsLimit) Accept(_ sdk.Context, msg AuthzableWasmMsg) (*ContractAut if !msg.GetFunds().IsAllLTE(m.Amounts) { return &ContractAuthzLimitAcceptResult{Accepted: false}, nil } - newAmounts := m.Amounts.Sub(msg.GetFunds()) + newAmounts := m.Amounts.Sub(msg.GetFunds()...) if newAmounts.IsZero() { return &ContractAuthzLimitAcceptResult{Accepted: true, DeleteLimit: true}, nil } @@ -508,7 +508,7 @@ func (l CombinedLimit) Accept(_ sdk.Context, msg AuthzableWasmMsg) (*ContractAut case 1: return &ContractAuthzLimitAcceptResult{Accepted: true, DeleteLimit: true}, nil default: - remainingAmounts := l.Amounts.Sub(transferFunds) + remainingAmounts := l.Amounts.Sub(transferFunds...) if remainingAmounts.IsZero() { return &ContractAuthzLimitAcceptResult{Accepted: true, DeleteLimit: true}, nil } diff --git a/x/wasm/types/authz.pb.go b/x/wasm/types/authz.pb.go index 2564a91a6d..d8ca7533c0 100644 --- a/x/wasm/types/authz.pb.go +++ b/x/wasm/types/authz.pb.go @@ -5,24 +5,21 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -43,11 +40,9 @@ func (*ContractExecutionAuthorization) ProtoMessage() {} func (*ContractExecutionAuthorization) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{0} } - func (m *ContractExecutionAuthorization) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractExecutionAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractExecutionAuthorization.Marshal(b, m, deterministic) @@ -60,15 +55,12 @@ func (m *ContractExecutionAuthorization) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *ContractExecutionAuthorization) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractExecutionAuthorization.Merge(m, src) } - func (m *ContractExecutionAuthorization) XXX_Size() int { return m.Size() } - func (m *ContractExecutionAuthorization) XXX_DiscardUnknown() { xxx_messageInfo_ContractExecutionAuthorization.DiscardUnknown(m) } @@ -88,11 +80,9 @@ func (*ContractMigrationAuthorization) ProtoMessage() {} func (*ContractMigrationAuthorization) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{1} } - func (m *ContractMigrationAuthorization) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractMigrationAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractMigrationAuthorization.Marshal(b, m, deterministic) @@ -105,15 +95,12 @@ func (m *ContractMigrationAuthorization) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *ContractMigrationAuthorization) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractMigrationAuthorization.Merge(m, src) } - func (m *ContractMigrationAuthorization) XXX_Size() int { return m.Size() } - func (m *ContractMigrationAuthorization) XXX_DiscardUnknown() { xxx_messageInfo_ContractMigrationAuthorization.DiscardUnknown(m) } @@ -140,11 +127,9 @@ func (*ContractGrant) ProtoMessage() {} func (*ContractGrant) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{2} } - func (m *ContractGrant) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractGrant.Marshal(b, m, deterministic) @@ -157,15 +142,12 @@ func (m *ContractGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *ContractGrant) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractGrant.Merge(m, src) } - func (m *ContractGrant) XXX_Size() int { return m.Size() } - func (m *ContractGrant) XXX_DiscardUnknown() { xxx_messageInfo_ContractGrant.DiscardUnknown(m) } @@ -185,11 +167,9 @@ func (*MaxCallsLimit) ProtoMessage() {} func (*MaxCallsLimit) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{3} } - func (m *MaxCallsLimit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MaxCallsLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MaxCallsLimit.Marshal(b, m, deterministic) @@ -202,15 +182,12 @@ func (m *MaxCallsLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *MaxCallsLimit) XXX_Merge(src proto.Message) { xxx_messageInfo_MaxCallsLimit.Merge(m, src) } - func (m *MaxCallsLimit) XXX_Size() int { return m.Size() } - func (m *MaxCallsLimit) XXX_DiscardUnknown() { xxx_messageInfo_MaxCallsLimit.DiscardUnknown(m) } @@ -230,11 +207,9 @@ func (*MaxFundsLimit) ProtoMessage() {} func (*MaxFundsLimit) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{4} } - func (m *MaxFundsLimit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MaxFundsLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MaxFundsLimit.Marshal(b, m, deterministic) @@ -247,15 +222,12 @@ func (m *MaxFundsLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *MaxFundsLimit) XXX_Merge(src proto.Message) { xxx_messageInfo_MaxFundsLimit.Merge(m, src) } - func (m *MaxFundsLimit) XXX_Size() int { return m.Size() } - func (m *MaxFundsLimit) XXX_DiscardUnknown() { xxx_messageInfo_MaxFundsLimit.DiscardUnknown(m) } @@ -278,11 +250,9 @@ func (*CombinedLimit) ProtoMessage() {} func (*CombinedLimit) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{5} } - func (m *CombinedLimit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *CombinedLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CombinedLimit.Marshal(b, m, deterministic) @@ -295,15 +265,12 @@ func (m *CombinedLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *CombinedLimit) XXX_Merge(src proto.Message) { xxx_messageInfo_CombinedLimit.Merge(m, src) } - func (m *CombinedLimit) XXX_Size() int { return m.Size() } - func (m *CombinedLimit) XXX_DiscardUnknown() { xxx_messageInfo_CombinedLimit.DiscardUnknown(m) } @@ -313,7 +280,8 @@ var xxx_messageInfo_CombinedLimit proto.InternalMessageInfo // AllowAllMessagesFilter is a wildcard to allow any type of contract payload // message. // Since: wasmd 0.30 -type AllowAllMessagesFilter struct{} +type AllowAllMessagesFilter struct { +} func (m *AllowAllMessagesFilter) Reset() { *m = AllowAllMessagesFilter{} } func (m *AllowAllMessagesFilter) String() string { return proto.CompactTextString(m) } @@ -321,11 +289,9 @@ func (*AllowAllMessagesFilter) ProtoMessage() {} func (*AllowAllMessagesFilter) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{6} } - func (m *AllowAllMessagesFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AllowAllMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AllowAllMessagesFilter.Marshal(b, m, deterministic) @@ -338,15 +304,12 @@ func (m *AllowAllMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *AllowAllMessagesFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_AllowAllMessagesFilter.Merge(m, src) } - func (m *AllowAllMessagesFilter) XXX_Size() int { return m.Size() } - func (m *AllowAllMessagesFilter) XXX_DiscardUnknown() { xxx_messageInfo_AllowAllMessagesFilter.DiscardUnknown(m) } @@ -367,11 +330,9 @@ func (*AcceptedMessageKeysFilter) ProtoMessage() {} func (*AcceptedMessageKeysFilter) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{7} } - func (m *AcceptedMessageKeysFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AcceptedMessageKeysFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AcceptedMessageKeysFilter.Marshal(b, m, deterministic) @@ -384,15 +345,12 @@ func (m *AcceptedMessageKeysFilter) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } - func (m *AcceptedMessageKeysFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_AcceptedMessageKeysFilter.Merge(m, src) } - func (m *AcceptedMessageKeysFilter) XXX_Size() int { return m.Size() } - func (m *AcceptedMessageKeysFilter) XXX_DiscardUnknown() { xxx_messageInfo_AcceptedMessageKeysFilter.DiscardUnknown(m) } @@ -413,11 +371,9 @@ func (*AcceptedMessagesFilter) ProtoMessage() {} func (*AcceptedMessagesFilter) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{8} } - func (m *AcceptedMessagesFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AcceptedMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AcceptedMessagesFilter.Marshal(b, m, deterministic) @@ -430,15 +386,12 @@ func (m *AcceptedMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *AcceptedMessagesFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_AcceptedMessagesFilter.Merge(m, src) } - func (m *AcceptedMessagesFilter) XXX_Size() int { return m.Size() } - func (m *AcceptedMessagesFilter) XXX_DiscardUnknown() { xxx_messageInfo_AcceptedMessagesFilter.DiscardUnknown(m) } @@ -834,7 +787,6 @@ func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *ContractExecutionAuthorization) Size() (n int) { if m == nil { return 0 @@ -973,11 +925,9 @@ func (m *AcceptedMessagesFilter) Size() (n int) { func sovAuthz(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozAuthz(x uint64) (n int) { return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *ContractExecutionAuthorization) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1062,7 +1012,6 @@ func (m *ContractExecutionAuthorization) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractMigrationAuthorization) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1147,7 +1096,6 @@ func (m *ContractMigrationAuthorization) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractGrant) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1302,7 +1250,6 @@ func (m *ContractGrant) Unmarshal(dAtA []byte) error { } return nil } - func (m *MaxCallsLimit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1372,7 +1319,6 @@ func (m *MaxCallsLimit) Unmarshal(dAtA []byte) error { } return nil } - func (m *MaxFundsLimit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1457,7 +1403,6 @@ func (m *MaxFundsLimit) Unmarshal(dAtA []byte) error { } return nil } - func (m *CombinedLimit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1561,7 +1506,6 @@ func (m *CombinedLimit) Unmarshal(dAtA []byte) error { } return nil } - func (m *AllowAllMessagesFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1612,7 +1556,6 @@ func (m *AllowAllMessagesFilter) Unmarshal(dAtA []byte) error { } return nil } - func (m *AcceptedMessageKeysFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1695,7 +1638,6 @@ func (m *AcceptedMessageKeysFilter) Unmarshal(dAtA []byte) error { } return nil } - func (m *AcceptedMessagesFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1778,7 +1720,6 @@ func (m *AcceptedMessagesFilter) Unmarshal(dAtA []byte) error { } return nil } - func skipAuthz(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/codec.go b/x/wasm/types/codec.go index 7d8ebcbe46..ae9b72d1ff 100644 --- a/x/wasm/types/codec.go +++ b/x/wasm/types/codec.go @@ -7,11 +7,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" "github.com/cosmos/cosmos-sdk/x/authz" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // RegisterLegacyAminoCodec registers the account types and interface -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { //nolint:staticcheck +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgStoreCode{}, "wasm/MsgStoreCode", nil) cdc.RegisterConcrete(&MsgInstantiateContract{}, "wasm/MsgInstantiateContract", nil) cdc.RegisterConcrete(&MsgInstantiateContract2{}, "wasm/MsgInstantiateContract2", nil) @@ -65,7 +65,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgUpdateInstantiateConfig{}, ) registry.RegisterImplementations( - (*govtypes.Content)(nil), + (*govv1beta1.Content)(nil), &StoreCodeProposal{}, &InstantiateContractProposal{}, &InstantiateContract2Proposal{}, diff --git a/x/wasm/types/errors.go b/x/wasm/types/errors.go index 297f34d530..70b854cf90 100644 --- a/x/wasm/types/errors.go +++ b/x/wasm/types/errors.go @@ -1,8 +1,8 @@ package types import ( + sdkErrors "cosmossdk.io/errors" wasmvmtypes "github.com/CosmWasm/wasmvm/types" - sdkErrors "github.com/cosmos/cosmos-sdk/types/errors" ) // Codes for wasm contract errors diff --git a/x/wasm/types/errors_test.go b/x/wasm/types/errors_test.go index 76a1c0239c..495f5e828b 100644 --- a/x/wasm/types/errors_test.go +++ b/x/wasm/types/errors_test.go @@ -4,8 +4,8 @@ import ( "errors" "testing" + errorsmod "cosmossdk.io/errors" wasmvmtypes "github.com/CosmWasm/wasmvm/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -17,7 +17,7 @@ func TestWasmVMFlavouredError(t *testing.T) { }{ "IsOf": { exec: func(t *testing.T) { - assert.True(t, sdkerrors.IsOf(myErr, myErr.sdkErr)) + assert.True(t, errorsmod.IsOf(myErr, myErr.sdkErr)) assert.Equal(t, myErr.sdkErr, myErr.Unwrap()) }, }, @@ -65,7 +65,7 @@ func TestWasmVMFlavouredError(t *testing.T) { }, "abci info": { exec: func(t *testing.T) { - codespace, code, log := sdkerrors.ABCIInfo(myErr, false) + codespace, code, log := errorsmod.ABCIInfo(myErr, false) assert.Equal(t, DefaultCodespace, codespace) assert.Equal(t, uint32(28), code) assert.Equal(t, "no such code", log) @@ -73,7 +73,7 @@ func TestWasmVMFlavouredError(t *testing.T) { }, "abci info - wrapped": { exec: func(t *testing.T) { - codespace, code, log := sdkerrors.ABCIInfo(myErr.Wrap("my description"), false) + codespace, code, log := errorsmod.ABCIInfo(myErr.Wrap("my description"), false) assert.Equal(t, DefaultCodespace, codespace) assert.Equal(t, uint32(28), code) assert.Equal(t, "my description: no such code", log) diff --git a/x/wasm/types/expected_keepers.go b/x/wasm/types/expected_keepers.go index 57cc4073f5..82547cadc4 100644 --- a/x/wasm/types/expected_keepers.go +++ b/x/wasm/types/expected_keepers.go @@ -8,9 +8,10 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - connectiontypes "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v4/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported" ) // BankViewKeeper defines a subset of methods implemented by the cosmos-sdk bank keeper @@ -72,8 +73,8 @@ type StakingKeeper interface { type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) - SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error + SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (uint64, error) GetAllChannels(ctx sdk.Context) (channels []channeltypes.IdentifiedChannel) IterateChannels(ctx sdk.Context, cb func(channeltypes.IdentifiedChannel) bool) SetChannel(ctx sdk.Context, portID, channelID string, channel channeltypes.Channel) diff --git a/x/wasm/types/genesis.pb.go b/x/wasm/types/genesis.pb.go index b753dc1a83..f0c4530f35 100644 --- a/x/wasm/types/genesis.pb.go +++ b/x/wasm/types/genesis.pb.go @@ -5,20 +5,17 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -40,11 +37,9 @@ func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []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) @@ -57,15 +52,12 @@ func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) 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) } @@ -115,11 +107,9 @@ func (*Code) ProtoMessage() {} func (*Code) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []int{1} } - func (m *Code) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Code) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Code.Marshal(b, m, deterministic) @@ -132,15 +122,12 @@ func (m *Code) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Code) XXX_Merge(src proto.Message) { xxx_messageInfo_Code.Merge(m, src) } - func (m *Code) XXX_Size() int { return m.Size() } - func (m *Code) XXX_DiscardUnknown() { xxx_messageInfo_Code.DiscardUnknown(m) } @@ -189,11 +176,9 @@ func (*Contract) ProtoMessage() {} func (*Contract) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []int{2} } - func (m *Contract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Contract.Marshal(b, m, deterministic) @@ -206,15 +191,12 @@ func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Contract) XXX_Merge(src proto.Message) { xxx_messageInfo_Contract.Merge(m, src) } - func (m *Contract) XXX_Size() int { return m.Size() } - func (m *Contract) XXX_DiscardUnknown() { xxx_messageInfo_Contract.DiscardUnknown(m) } @@ -261,11 +243,9 @@ func (*Sequence) ProtoMessage() {} func (*Sequence) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []int{3} } - func (m *Sequence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Sequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Sequence.Marshal(b, m, deterministic) @@ -278,15 +258,12 @@ func (m *Sequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Sequence) XXX_Merge(src proto.Message) { xxx_messageInfo_Sequence.Merge(m, src) } - func (m *Sequence) XXX_Size() int { return m.Size() } - func (m *Sequence) XXX_DiscardUnknown() { xxx_messageInfo_Sequence.DiscardUnknown(m) } @@ -599,7 +576,6 @@ func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *GenesisState) Size() (n int) { if m == nil { return 0 @@ -696,11 +672,9 @@ func (m *Sequence) Size() (n int) { 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 @@ -886,7 +860,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } - func (m *Code) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1043,7 +1016,6 @@ func (m *Code) Unmarshal(dAtA []byte) error { } return nil } - func (m *Contract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1227,7 +1199,6 @@ func (m *Contract) Unmarshal(dAtA []byte) error { } return nil } - func (m *Sequence) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1331,7 +1302,6 @@ func (m *Sequence) Unmarshal(dAtA []byte) error { } return nil } - func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/genesis_test.go b/x/wasm/types/genesis_test.go index 51c95e4d16..022dfb3bc5 100644 --- a/x/wasm/types/genesis_test.go +++ b/x/wasm/types/genesis_test.go @@ -8,13 +8,15 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/assert" "github.com/tendermint/tendermint/libs/rand" "github.com/stretchr/testify/require" ) +const invalid = "invalid" + func TestValidateGenesisState(t *testing.T) { specs := map[string]struct { srcMutator func(*GenesisState) @@ -37,7 +39,7 @@ func TestValidateGenesisState(t *testing.T) { }, "contract invalid": { srcMutator: func(s *GenesisState) { - s.Contracts[0].ContractAddress = "invalid" + s.Contracts[0].ContractAddress = invalid }, expError: true, }, @@ -119,13 +121,13 @@ func TestContractValidateBasic(t *testing.T) { "all good": {srcMutator: func(_ *Contract) {}}, "contract address invalid": { srcMutator: func(c *Contract) { - c.ContractAddress = "invalid" + c.ContractAddress = invalid }, expError: true, }, "contract info invalid": { srcMutator: func(c *Contract) { - c.ContractInfo.Creator = "invalid" + c.ContractInfo.Creator = invalid }, expError: true, }, diff --git a/x/wasm/types/ibc.pb.go b/x/wasm/types/ibc.pb.go index 5e63f615a1..3d70a90c74 100644 --- a/x/wasm/types/ibc.pb.go +++ b/x/wasm/types/ibc.pb.go @@ -5,20 +5,17 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -47,11 +44,9 @@ func (*MsgIBCSend) ProtoMessage() {} func (*MsgIBCSend) Descriptor() ([]byte, []int) { return fileDescriptor_af0d1c43ea53c4b9, []int{0} } - func (m *MsgIBCSend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgIBCSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgIBCSend.Marshal(b, m, deterministic) @@ -64,15 +59,12 @@ func (m *MsgIBCSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *MsgIBCSend) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgIBCSend.Merge(m, src) } - func (m *MsgIBCSend) XXX_Size() int { return m.Size() } - func (m *MsgIBCSend) XXX_DiscardUnknown() { xxx_messageInfo_MsgIBCSend.DiscardUnknown(m) } @@ -91,11 +83,9 @@ func (*MsgIBCSendResponse) ProtoMessage() {} func (*MsgIBCSendResponse) Descriptor() ([]byte, []int) { return fileDescriptor_af0d1c43ea53c4b9, []int{1} } - func (m *MsgIBCSendResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgIBCSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgIBCSendResponse.Marshal(b, m, deterministic) @@ -108,15 +98,12 @@ func (m *MsgIBCSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *MsgIBCSendResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgIBCSendResponse.Merge(m, src) } - func (m *MsgIBCSendResponse) XXX_Size() int { return m.Size() } - func (m *MsgIBCSendResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgIBCSendResponse.DiscardUnknown(m) } @@ -134,11 +121,9 @@ func (*MsgIBCCloseChannel) ProtoMessage() {} func (*MsgIBCCloseChannel) Descriptor() ([]byte, []int) { return fileDescriptor_af0d1c43ea53c4b9, []int{2} } - func (m *MsgIBCCloseChannel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgIBCCloseChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgIBCCloseChannel.Marshal(b, m, deterministic) @@ -151,15 +136,12 @@ func (m *MsgIBCCloseChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *MsgIBCCloseChannel) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgIBCCloseChannel.Merge(m, src) } - func (m *MsgIBCCloseChannel) XXX_Size() int { return m.Size() } - func (m *MsgIBCCloseChannel) XXX_DiscardUnknown() { xxx_messageInfo_MsgIBCCloseChannel.DiscardUnknown(m) } @@ -315,7 +297,6 @@ func encodeVarintIbc(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *MsgIBCSend) Size() (n int) { if m == nil { return 0 @@ -367,11 +348,9 @@ func (m *MsgIBCCloseChannel) Size() (n int) { func sovIbc(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozIbc(x uint64) (n int) { return sovIbc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *MsgIBCSend) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -526,7 +505,6 @@ func (m *MsgIBCSend) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgIBCSendResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -596,7 +574,6 @@ func (m *MsgIBCSendResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgIBCCloseChannel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -679,7 +656,6 @@ func (m *MsgIBCCloseChannel) Unmarshal(dAtA []byte) error { } return nil } - func skipIbc(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/json_matching_test.go b/x/wasm/types/json_matching_test.go index 01d2d3efd3..286fde3969 100644 --- a/x/wasm/types/json_matching_test.go +++ b/x/wasm/types/json_matching_test.go @@ -81,11 +81,11 @@ func TestIsJSONObjectWithTopLevelKey(t *testing.T) { expResult: false, }, // not supported: https://github.com/golang/go/issues/24415 - //"errors for duplicate key": { + // "errors for duplicate key": { // src: []byte(`{"claim": "foo", "claim":"bar"}`), // allowedKeys: []string{"claim"}, // expErr: ErrNotAJSONObject, - //}, + // }, // Not one top-level key "false for no top-level key": { diff --git a/x/wasm/types/keys.go b/x/wasm/types/keys.go index 95078e1445..b2d4a94c9f 100644 --- a/x/wasm/types/keys.go +++ b/x/wasm/types/keys.go @@ -22,7 +22,6 @@ const ( RouterKey = ModuleName ) -// nolint var ( CodeKeyPrefix = []byte{0x01} ContractKeyPrefix = []byte{0x02} diff --git a/x/wasm/types/keys_test.go b/x/wasm/types/keys_test.go index 3db6bbadfe..a75ddb9c5e 100644 --- a/x/wasm/types/keys_test.go +++ b/x/wasm/types/keys_test.go @@ -108,22 +108,6 @@ func TestGetContractByCreatorSecondaryIndexKey(t *testing.T) { } assert.Equal(t, exp, got) - // test that contract addresses of 32 length are still supported - contractAddr = bytes.Repeat([]byte{4}, 32) - got = GetContractByCreatorSecondaryIndexKey(creatorAddr, e.Updated.Bytes(), contractAddr) - exp = []byte{ - 9, // prefix - 20, // creator address length - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, // creator address with fixed length prefix - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 0, 0, 0, 0, 0, 0, 2, // height - 1, 0, 0, 0, 0, 0, 0, 3, // index - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, // address 32 bytes - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, - } - // test that creator is contract addresses of 32 length contractAddr = bytes.Repeat([]byte{4}, 32) creatorAddr = bytes.Repeat([]byte{8}, 32) diff --git a/x/wasm/types/proposal.go b/x/wasm/types/proposal.go index 96e2c9b510..1b13cb141e 100644 --- a/x/wasm/types/proposal.go +++ b/x/wasm/types/proposal.go @@ -9,6 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) type ProposalType string @@ -66,30 +67,28 @@ func ConvertToProposals(keys []string) ([]ProposalType, error) { } func init() { // register new content types with the sdk - govtypes.RegisterProposalType(string(ProposalTypeStoreCode)) - govtypes.RegisterProposalType(string(ProposalTypeInstantiateContract)) - govtypes.RegisterProposalType(string(ProposalTypeInstantiateContract2)) - govtypes.RegisterProposalType(string(ProposalTypeMigrateContract)) - govtypes.RegisterProposalType(string(ProposalTypeSudoContract)) - govtypes.RegisterProposalType(string(ProposalTypeExecuteContract)) - govtypes.RegisterProposalType(string(ProposalTypeUpdateAdmin)) - govtypes.RegisterProposalType(string(ProposalTypeClearAdmin)) - govtypes.RegisterProposalType(string(ProposalTypePinCodes)) - govtypes.RegisterProposalType(string(ProposalTypeUnpinCodes)) - govtypes.RegisterProposalType(string(ProposalTypeUpdateInstantiateConfig)) - govtypes.RegisterProposalType(string(ProposalTypeStoreAndInstantiateContractProposal)) - govtypes.RegisterProposalTypeCodec(&StoreCodeProposal{}, "wasm/StoreCodeProposal") - govtypes.RegisterProposalTypeCodec(&InstantiateContractProposal{}, "wasm/InstantiateContractProposal") - govtypes.RegisterProposalTypeCodec(&InstantiateContract2Proposal{}, "wasm/InstantiateContract2Proposal") - govtypes.RegisterProposalTypeCodec(&MigrateContractProposal{}, "wasm/MigrateContractProposal") - govtypes.RegisterProposalTypeCodec(&SudoContractProposal{}, "wasm/SudoContractProposal") - govtypes.RegisterProposalTypeCodec(&ExecuteContractProposal{}, "wasm/ExecuteContractProposal") - govtypes.RegisterProposalTypeCodec(&UpdateAdminProposal{}, "wasm/UpdateAdminProposal") - govtypes.RegisterProposalTypeCodec(&ClearAdminProposal{}, "wasm/ClearAdminProposal") - govtypes.RegisterProposalTypeCodec(&PinCodesProposal{}, "wasm/PinCodesProposal") - govtypes.RegisterProposalTypeCodec(&UnpinCodesProposal{}, "wasm/UnpinCodesProposal") - govtypes.RegisterProposalTypeCodec(&UpdateInstantiateConfigProposal{}, "wasm/UpdateInstantiateConfigProposal") - govtypes.RegisterProposalTypeCodec(&StoreAndInstantiateContractProposal{}, "wasm/StoreAndInstantiateContractProposal") + govv1beta1.RegisterProposalType(string(ProposalTypeStoreCode)) + govv1beta1.RegisterProposalType(string(ProposalTypeInstantiateContract)) + govv1beta1.RegisterProposalType(string(ProposalTypeMigrateContract)) + govv1beta1.RegisterProposalType(string(ProposalTypeSudoContract)) + govv1beta1.RegisterProposalType(string(ProposalTypeExecuteContract)) + govv1beta1.RegisterProposalType(string(ProposalTypeUpdateAdmin)) + govv1beta1.RegisterProposalType(string(ProposalTypeClearAdmin)) + govv1beta1.RegisterProposalType(string(ProposalTypePinCodes)) + govv1beta1.RegisterProposalType(string(ProposalTypeUnpinCodes)) + govv1beta1.RegisterProposalType(string(ProposalTypeUpdateInstantiateConfig)) + govv1beta1.RegisterProposalType(string(ProposalTypeStoreAndInstantiateContractProposal)) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&StoreCodeProposal{}, "wasm/StoreCodeProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&InstantiateContractProposal{}, "wasm/InstantiateContractProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&MigrateContractProposal{}, "wasm/MigrateContractProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&SudoContractProposal{}, "wasm/SudoContractProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&ExecuteContractProposal{}, "wasm/ExecuteContractProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&UpdateAdminProposal{}, "wasm/UpdateAdminProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&ClearAdminProposal{}, "wasm/ClearAdminProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&PinCodesProposal{}, "wasm/PinCodesProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&UnpinCodesProposal{}, "wasm/UnpinCodesProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&UpdateInstantiateConfigProposal{}, "wasm/UpdateInstantiateConfigProposal", nil) + govv1beta1.ModuleCdc.LegacyAmino.RegisterConcrete(&StoreAndInstantiateContractProposal{}, "wasm/StoreAndInstantiateContractProposal", nil) } func NewStoreCodeProposal( @@ -915,8 +914,8 @@ func validateProposalCommons(title, description string) error { if len(title) == 0 { return sdkerrors.Wrap(govtypes.ErrInvalidProposalContent, "proposal title cannot be blank") } - if len(title) > govtypes.MaxTitleLength { - return sdkerrors.Wrapf(govtypes.ErrInvalidProposalContent, "proposal title is longer than max length of %d", govtypes.MaxTitleLength) + if len(title) > govv1beta1.MaxTitleLength { + return sdkerrors.Wrapf(govtypes.ErrInvalidProposalContent, "proposal title is longer than max length of %d", govv1beta1.MaxTitleLength) } if strings.TrimSpace(description) != description { return sdkerrors.Wrap(govtypes.ErrInvalidProposalContent, "proposal description must not start/end with white spaces") @@ -924,8 +923,8 @@ func validateProposalCommons(title, description string) error { if len(description) == 0 { return sdkerrors.Wrap(govtypes.ErrInvalidProposalContent, "proposal description cannot be blank") } - if len(description) > govtypes.MaxDescriptionLength { - return sdkerrors.Wrapf(govtypes.ErrInvalidProposalContent, "proposal description is longer than max length of %d", govtypes.MaxDescriptionLength) + if len(description) > govv1beta1.MaxDescriptionLength { + return sdkerrors.Wrapf(govtypes.ErrInvalidProposalContent, "proposal description is longer than max length of %d", govv1beta1.MaxDescriptionLength) } return nil } diff --git a/x/wasm/types/proposal.pb.go b/x/wasm/types/proposal.pb.go index 39f23e303c..75b37df11b 100644 --- a/x/wasm/types/proposal.pb.go +++ b/x/wasm/types/proposal.pb.go @@ -6,23 +6,20 @@ package types import ( bytes "bytes" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -59,11 +56,9 @@ func (*StoreCodeProposal) ProtoMessage() {} func (*StoreCodeProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{0} } - func (m *StoreCodeProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *StoreCodeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_StoreCodeProposal.Marshal(b, m, deterministic) @@ -76,15 +71,12 @@ func (m *StoreCodeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } - func (m *StoreCodeProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_StoreCodeProposal.Merge(m, src) } - func (m *StoreCodeProposal) XXX_Size() int { return m.Size() } - func (m *StoreCodeProposal) XXX_DiscardUnknown() { xxx_messageInfo_StoreCodeProposal.DiscardUnknown(m) } @@ -117,11 +109,9 @@ func (*InstantiateContractProposal) ProtoMessage() {} func (*InstantiateContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{1} } - func (m *InstantiateContractProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *InstantiateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_InstantiateContractProposal.Marshal(b, m, deterministic) @@ -134,15 +124,12 @@ func (m *InstantiateContractProposal) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *InstantiateContractProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_InstantiateContractProposal.Merge(m, src) } - func (m *InstantiateContractProposal) XXX_Size() int { return m.Size() } - func (m *InstantiateContractProposal) XXX_DiscardUnknown() { xxx_messageInfo_InstantiateContractProposal.DiscardUnknown(m) } @@ -156,7 +143,7 @@ type InstantiateContract2Proposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` // Description is a human readable text Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // RunAs is the address that is passed to the contract's environment as sender + // RunAs is the address that is passed to the contract's enviroment as sender RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` // Admin is an optional address that can execute migrations Admin string `protobuf:"bytes,4,opt,name=admin,proto3" json:"admin,omitempty"` @@ -180,11 +167,9 @@ func (*InstantiateContract2Proposal) ProtoMessage() {} func (*InstantiateContract2Proposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{2} } - func (m *InstantiateContract2Proposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *InstantiateContract2Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_InstantiateContract2Proposal.Marshal(b, m, deterministic) @@ -197,15 +182,12 @@ func (m *InstantiateContract2Proposal) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *InstantiateContract2Proposal) XXX_Merge(src proto.Message) { xxx_messageInfo_InstantiateContract2Proposal.Merge(m, src) } - func (m *InstantiateContract2Proposal) XXX_Size() int { return m.Size() } - func (m *InstantiateContract2Proposal) XXX_DiscardUnknown() { xxx_messageInfo_InstantiateContract2Proposal.DiscardUnknown(m) } @@ -231,11 +213,9 @@ func (*MigrateContractProposal) ProtoMessage() {} func (*MigrateContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{3} } - func (m *MigrateContractProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MigrateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MigrateContractProposal.Marshal(b, m, deterministic) @@ -248,15 +228,12 @@ func (m *MigrateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *MigrateContractProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_MigrateContractProposal.Merge(m, src) } - func (m *MigrateContractProposal) XXX_Size() int { return m.Size() } - func (m *MigrateContractProposal) XXX_DiscardUnknown() { xxx_messageInfo_MigrateContractProposal.DiscardUnknown(m) } @@ -280,11 +257,9 @@ func (*SudoContractProposal) ProtoMessage() {} func (*SudoContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{4} } - func (m *SudoContractProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *SudoContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SudoContractProposal.Marshal(b, m, deterministic) @@ -297,15 +272,12 @@ func (m *SudoContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } - func (m *SudoContractProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_SudoContractProposal.Merge(m, src) } - func (m *SudoContractProposal) XXX_Size() int { return m.Size() } - func (m *SudoContractProposal) XXX_DiscardUnknown() { xxx_messageInfo_SudoContractProposal.DiscardUnknown(m) } @@ -334,11 +306,9 @@ func (*ExecuteContractProposal) ProtoMessage() {} func (*ExecuteContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{5} } - func (m *ExecuteContractProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ExecuteContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ExecuteContractProposal.Marshal(b, m, deterministic) @@ -351,15 +321,12 @@ func (m *ExecuteContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *ExecuteContractProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_ExecuteContractProposal.Merge(m, src) } - func (m *ExecuteContractProposal) XXX_Size() int { return m.Size() } - func (m *ExecuteContractProposal) XXX_DiscardUnknown() { xxx_messageInfo_ExecuteContractProposal.DiscardUnknown(m) } @@ -383,11 +350,9 @@ func (*UpdateAdminProposal) ProtoMessage() {} func (*UpdateAdminProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{6} } - func (m *UpdateAdminProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *UpdateAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UpdateAdminProposal.Marshal(b, m, deterministic) @@ -400,15 +365,12 @@ func (m *UpdateAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *UpdateAdminProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_UpdateAdminProposal.Merge(m, src) } - func (m *UpdateAdminProposal) XXX_Size() int { return m.Size() } - func (m *UpdateAdminProposal) XXX_DiscardUnknown() { xxx_messageInfo_UpdateAdminProposal.DiscardUnknown(m) } @@ -431,11 +393,9 @@ func (*ClearAdminProposal) ProtoMessage() {} func (*ClearAdminProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{7} } - func (m *ClearAdminProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ClearAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ClearAdminProposal.Marshal(b, m, deterministic) @@ -448,15 +408,12 @@ func (m *ClearAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *ClearAdminProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_ClearAdminProposal.Merge(m, src) } - func (m *ClearAdminProposal) XXX_Size() int { return m.Size() } - func (m *ClearAdminProposal) XXX_DiscardUnknown() { xxx_messageInfo_ClearAdminProposal.DiscardUnknown(m) } @@ -479,11 +436,9 @@ func (*PinCodesProposal) ProtoMessage() {} func (*PinCodesProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{8} } - func (m *PinCodesProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *PinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_PinCodesProposal.Marshal(b, m, deterministic) @@ -496,15 +451,12 @@ func (m *PinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } - func (m *PinCodesProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_PinCodesProposal.Merge(m, src) } - func (m *PinCodesProposal) XXX_Size() int { return m.Size() } - func (m *PinCodesProposal) XXX_DiscardUnknown() { xxx_messageInfo_PinCodesProposal.DiscardUnknown(m) } @@ -527,11 +479,9 @@ func (*UnpinCodesProposal) ProtoMessage() {} func (*UnpinCodesProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{9} } - func (m *UnpinCodesProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *UnpinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UnpinCodesProposal.Marshal(b, m, deterministic) @@ -544,15 +494,12 @@ func (m *UnpinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *UnpinCodesProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_UnpinCodesProposal.Merge(m, src) } - func (m *UnpinCodesProposal) XXX_Size() int { return m.Size() } - func (m *UnpinCodesProposal) XXX_DiscardUnknown() { xxx_messageInfo_UnpinCodesProposal.DiscardUnknown(m) } @@ -573,11 +520,9 @@ func (*AccessConfigUpdate) ProtoMessage() {} func (*AccessConfigUpdate) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{10} } - func (m *AccessConfigUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AccessConfigUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AccessConfigUpdate.Marshal(b, m, deterministic) @@ -590,15 +535,12 @@ func (m *AccessConfigUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *AccessConfigUpdate) XXX_Merge(src proto.Message) { xxx_messageInfo_AccessConfigUpdate.Merge(m, src) } - func (m *AccessConfigUpdate) XXX_Size() int { return m.Size() } - func (m *AccessConfigUpdate) XXX_DiscardUnknown() { xxx_messageInfo_AccessConfigUpdate.DiscardUnknown(m) } @@ -622,11 +564,9 @@ func (*UpdateInstantiateConfigProposal) ProtoMessage() {} func (*UpdateInstantiateConfigProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{11} } - func (m *UpdateInstantiateConfigProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *UpdateInstantiateConfigProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UpdateInstantiateConfigProposal.Marshal(b, m, deterministic) @@ -639,15 +579,12 @@ func (m *UpdateInstantiateConfigProposal) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } - func (m *UpdateInstantiateConfigProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_UpdateInstantiateConfigProposal.Merge(m, src) } - func (m *UpdateInstantiateConfigProposal) XXX_Size() int { return m.Size() } - func (m *UpdateInstantiateConfigProposal) XXX_DiscardUnknown() { xxx_messageInfo_UpdateInstantiateConfigProposal.DiscardUnknown(m) } @@ -692,11 +629,9 @@ func (*StoreAndInstantiateContractProposal) ProtoMessage() {} func (*StoreAndInstantiateContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{12} } - func (m *StoreAndInstantiateContractProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *StoreAndInstantiateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_StoreAndInstantiateContractProposal.Marshal(b, m, deterministic) @@ -709,15 +644,12 @@ func (m *StoreAndInstantiateContractProposal) XXX_Marshal(b []byte, deterministi return b[:n], nil } } - func (m *StoreAndInstantiateContractProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_StoreAndInstantiateContractProposal.Merge(m, src) } - func (m *StoreAndInstantiateContractProposal) XXX_Size() int { return m.Size() } - func (m *StoreAndInstantiateContractProposal) XXX_DiscardUnknown() { xxx_messageInfo_StoreAndInstantiateContractProposal.DiscardUnknown(m) } @@ -859,7 +791,6 @@ func (this *StoreCodeProposal) Equal(that interface{}) bool { } return true } - func (this *InstantiateContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -910,7 +841,6 @@ func (this *InstantiateContractProposal) Equal(that interface{}) bool { } return true } - func (this *InstantiateContract2Proposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -967,7 +897,6 @@ func (this *InstantiateContract2Proposal) Equal(that interface{}) bool { } return true } - func (this *MigrateContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1004,7 +933,6 @@ func (this *MigrateContractProposal) Equal(that interface{}) bool { } return true } - func (this *SudoContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1038,7 +966,6 @@ func (this *SudoContractProposal) Equal(that interface{}) bool { } return true } - func (this *ExecuteContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1083,7 +1010,6 @@ func (this *ExecuteContractProposal) Equal(that interface{}) bool { } return true } - func (this *UpdateAdminProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1117,7 +1043,6 @@ func (this *UpdateAdminProposal) Equal(that interface{}) bool { } return true } - func (this *ClearAdminProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1148,7 +1073,6 @@ func (this *ClearAdminProposal) Equal(that interface{}) bool { } return true } - func (this *PinCodesProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1184,7 +1108,6 @@ func (this *PinCodesProposal) Equal(that interface{}) bool { } return true } - func (this *UnpinCodesProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1220,7 +1143,6 @@ func (this *UnpinCodesProposal) Equal(that interface{}) bool { } return true } - func (this *AccessConfigUpdate) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1248,7 +1170,6 @@ func (this *AccessConfigUpdate) Equal(that interface{}) bool { } return true } - func (this *UpdateInstantiateConfigProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1284,7 +1205,6 @@ func (this *UpdateInstantiateConfigProposal) Equal(that interface{}) bool { } return true } - func (this *StoreAndInstantiateContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1350,7 +1270,6 @@ func (this *StoreAndInstantiateContractProposal) Equal(that interface{}) bool { } return true } - func (m *StoreCodeProposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2243,7 +2162,6 @@ func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *StoreCodeProposal) Size() (n int) { if m == nil { return 0 @@ -2663,11 +2581,9 @@ func (m *StoreAndInstantiateContractProposal) Size() (n int) { func sovProposal(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozProposal(x uint64) (n int) { return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *StoreCodeProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3002,7 +2918,6 @@ func (m *StoreCodeProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *InstantiateContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3300,7 +3215,6 @@ func (m *InstantiateContractProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *InstantiateContract2Proposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3652,7 +3566,6 @@ func (m *InstantiateContract2Proposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *MigrateContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3852,7 +3765,6 @@ func (m *MigrateContractProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *SudoContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4033,7 +3945,6 @@ func (m *SudoContractProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *ExecuteContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4280,7 +4191,6 @@ func (m *ExecuteContractProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *UpdateAdminProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4459,7 +4369,6 @@ func (m *UpdateAdminProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *ClearAdminProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4606,7 +4515,6 @@ func (m *ClearAdminProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *PinCodesProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4797,7 +4705,6 @@ func (m *PinCodesProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *UnpinCodesProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4988,7 +4895,6 @@ func (m *UnpinCodesProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5091,7 +4997,6 @@ func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error { } return nil } - func (m *UpdateInstantiateConfigProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5240,7 +5145,6 @@ func (m *UpdateInstantiateConfigProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *StoreAndInstantiateContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5707,7 +5611,6 @@ func (m *StoreAndInstantiateContractProposal) Unmarshal(dAtA []byte) error { } return nil } - func skipProposal(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/proposal_test.go b/x/wasm/types/proposal_test.go index a558744f8b..b3a8f6abc0 100644 --- a/x/wasm/types/proposal_test.go +++ b/x/wasm/types/proposal_test.go @@ -7,12 +7,14 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" ) +const invalidAddress = "invalid address" + func TestValidateProposalCommons(t *testing.T) { type commonProposal struct { Title, Description string @@ -48,7 +50,7 @@ func TestValidateProposalCommons(t *testing.T) { }, "prevent title exceeds max length ": { src: commonProposal{ - Title: strings.Repeat("a", govtypes.MaxTitleLength+1), + Title: strings.Repeat("a", govv1beta1.MaxTitleLength+1), Description: "Bar", }, expErr: true, @@ -76,7 +78,7 @@ func TestValidateProposalCommons(t *testing.T) { "prevent descr exceeds max length ": { src: commonProposal{ Title: "Foo", - Description: strings.Repeat("a", govtypes.MaxDescriptionLength+1), + Description: strings.Repeat("a", govv1beta1.MaxDescriptionLength+1), }, expErr: true, }, @@ -94,10 +96,7 @@ func TestValidateProposalCommons(t *testing.T) { } func TestValidateStoreCodeProposal(t *testing.T) { - var ( - anyAddress sdk.AccAddress = bytes.Repeat([]byte{0x0}, ContractAddrLen) - invalidAddress = "invalid address" - ) + var anyAddress sdk.AccAddress = bytes.Repeat([]byte{0x0}, ContractAddrLen) specs := map[string]struct { src *StoreCodeProposal @@ -187,8 +186,6 @@ func TestValidateStoreCodeProposal(t *testing.T) { } func TestValidateInstantiateContractProposal(t *testing.T) { - invalidAddress := "invalid address" - specs := map[string]struct { src *InstantiateContractProposal expErr bool @@ -280,8 +277,6 @@ func TestValidateInstantiateContractProposal(t *testing.T) { } func TestValidateInstantiateContract2Proposal(t *testing.T) { - invalidAddress := "invalid address" - specs := map[string]struct { src *InstantiateContract2Proposal expErr bool @@ -577,8 +572,6 @@ func TestValidateMigrateContractProposal(t *testing.T) { } func TestValidateSudoContractProposal(t *testing.T) { - invalidAddress := "invalid address" - specs := map[string]struct { src *SudoContractProposal expErr bool @@ -630,8 +623,6 @@ func TestValidateSudoContractProposal(t *testing.T) { } func TestValidateExecuteContractProposal(t *testing.T) { - invalidAddress := "invalid address" - specs := map[string]struct { src *ExecuteContractProposal expErr bool @@ -689,8 +680,6 @@ func TestValidateExecuteContractProposal(t *testing.T) { } func TestValidateUpdateAdminProposal(t *testing.T) { - invalidAddress := "invalid address" - specs := map[string]struct { src *UpdateAdminProposal expErr bool @@ -742,8 +731,6 @@ func TestValidateUpdateAdminProposal(t *testing.T) { } func TestValidateClearAdminProposal(t *testing.T) { - invalidAddress := "invalid address" - specs := map[string]struct { src *ClearAdminProposal expErr bool @@ -784,7 +771,7 @@ func TestValidateClearAdminProposal(t *testing.T) { func TestProposalStrings(t *testing.T) { specs := map[string]struct { - src govtypes.Content + src govv1beta1.Content exp string }{ "store code": { @@ -903,7 +890,7 @@ func TestProposalStrings(t *testing.T) { func TestProposalYaml(t *testing.T) { specs := map[string]struct { - src govtypes.Content + src govv1beta1.Content exp string }{ "store code": { @@ -1051,8 +1038,8 @@ func TestConvertToProposals(t *testing.T) { func TestUnmarshalContentFromJson(t *testing.T) { specs := map[string]struct { src string - got govtypes.Content - exp govtypes.Content + got govv1beta1.Content + exp govv1beta1.Content }{ "instantiate ": { src: ` @@ -1109,7 +1096,7 @@ func TestUnmarshalContentFromJson(t *testing.T) { func TestProposalJsonSignBytes(t *testing.T) { const myInnerMsg = `{"foo":"bar"}` specs := map[string]struct { - src govtypes.Content + src govv1beta1.Content exp string }{ "instantiate contract": { @@ -1131,7 +1118,7 @@ func TestProposalJsonSignBytes(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - msg, err := govtypes.NewMsgSubmitProposal(spec.src, sdk.NewCoins(), []byte{}) + msg, err := govv1beta1.NewMsgSubmitProposal(spec.src, sdk.NewCoins(), []byte{}) require.NoError(t, err) bz := msg.GetSignBytes() diff --git a/x/wasm/types/query.pb.go b/x/wasm/types/query.pb.go index 95175f2ae6..dafa74a5f2 100644 --- a/x/wasm/types/query.pb.go +++ b/x/wasm/types/query.pb.go @@ -7,10 +7,6 @@ import ( bytes "bytes" context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -20,14 +16,15 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -48,11 +45,9 @@ func (*QueryContractInfoRequest) ProtoMessage() {} func (*QueryContractInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{0} } - func (m *QueryContractInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractInfoRequest.Marshal(b, m, deterministic) @@ -65,15 +60,12 @@ func (m *QueryContractInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } - func (m *QueryContractInfoRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractInfoRequest.Merge(m, src) } - func (m *QueryContractInfoRequest) XXX_Size() int { return m.Size() } - func (m *QueryContractInfoRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractInfoRequest.DiscardUnknown(m) } @@ -94,11 +86,9 @@ func (*QueryContractInfoResponse) ProtoMessage() {} func (*QueryContractInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{1} } - func (m *QueryContractInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractInfoResponse.Marshal(b, m, deterministic) @@ -111,15 +101,12 @@ func (m *QueryContractInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } - func (m *QueryContractInfoResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractInfoResponse.Merge(m, src) } - func (m *QueryContractInfoResponse) XXX_Size() int { return m.Size() } - func (m *QueryContractInfoResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractInfoResponse.DiscardUnknown(m) } @@ -141,11 +128,9 @@ func (*QueryContractHistoryRequest) ProtoMessage() {} func (*QueryContractHistoryRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{2} } - func (m *QueryContractHistoryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractHistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractHistoryRequest.Marshal(b, m, deterministic) @@ -158,15 +143,12 @@ func (m *QueryContractHistoryRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryContractHistoryRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractHistoryRequest.Merge(m, src) } - func (m *QueryContractHistoryRequest) XXX_Size() int { return m.Size() } - func (m *QueryContractHistoryRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractHistoryRequest.DiscardUnknown(m) } @@ -187,11 +169,9 @@ func (*QueryContractHistoryResponse) ProtoMessage() {} func (*QueryContractHistoryResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{3} } - func (m *QueryContractHistoryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractHistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractHistoryResponse.Marshal(b, m, deterministic) @@ -204,15 +184,12 @@ func (m *QueryContractHistoryResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryContractHistoryResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractHistoryResponse.Merge(m, src) } - func (m *QueryContractHistoryResponse) XXX_Size() int { return m.Size() } - func (m *QueryContractHistoryResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractHistoryResponse.DiscardUnknown(m) } @@ -233,11 +210,9 @@ func (*QueryContractsByCodeRequest) ProtoMessage() {} func (*QueryContractsByCodeRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{4} } - func (m *QueryContractsByCodeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractsByCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractsByCodeRequest.Marshal(b, m, deterministic) @@ -250,15 +225,12 @@ func (m *QueryContractsByCodeRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryContractsByCodeRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractsByCodeRequest.Merge(m, src) } - func (m *QueryContractsByCodeRequest) XXX_Size() int { return m.Size() } - func (m *QueryContractsByCodeRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractsByCodeRequest.DiscardUnknown(m) } @@ -280,11 +252,9 @@ func (*QueryContractsByCodeResponse) ProtoMessage() {} func (*QueryContractsByCodeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{5} } - func (m *QueryContractsByCodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractsByCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractsByCodeResponse.Marshal(b, m, deterministic) @@ -297,15 +267,12 @@ func (m *QueryContractsByCodeResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryContractsByCodeResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractsByCodeResponse.Merge(m, src) } - func (m *QueryContractsByCodeResponse) XXX_Size() int { return m.Size() } - func (m *QueryContractsByCodeResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractsByCodeResponse.DiscardUnknown(m) } @@ -327,11 +294,9 @@ func (*QueryAllContractStateRequest) ProtoMessage() {} func (*QueryAllContractStateRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{6} } - func (m *QueryAllContractStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryAllContractStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllContractStateRequest.Marshal(b, m, deterministic) @@ -344,15 +309,12 @@ func (m *QueryAllContractStateRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryAllContractStateRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllContractStateRequest.Merge(m, src) } - func (m *QueryAllContractStateRequest) XXX_Size() int { return m.Size() } - func (m *QueryAllContractStateRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllContractStateRequest.DiscardUnknown(m) } @@ -373,11 +335,9 @@ func (*QueryAllContractStateResponse) ProtoMessage() {} func (*QueryAllContractStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{7} } - func (m *QueryAllContractStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryAllContractStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllContractStateResponse.Marshal(b, m, deterministic) @@ -390,15 +350,12 @@ func (m *QueryAllContractStateResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } - func (m *QueryAllContractStateResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllContractStateResponse.Merge(m, src) } - func (m *QueryAllContractStateResponse) XXX_Size() int { return m.Size() } - func (m *QueryAllContractStateResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllContractStateResponse.DiscardUnknown(m) } @@ -419,11 +376,9 @@ func (*QueryRawContractStateRequest) ProtoMessage() {} func (*QueryRawContractStateRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{8} } - func (m *QueryRawContractStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryRawContractStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryRawContractStateRequest.Marshal(b, m, deterministic) @@ -436,15 +391,12 @@ func (m *QueryRawContractStateRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryRawContractStateRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryRawContractStateRequest.Merge(m, src) } - func (m *QueryRawContractStateRequest) XXX_Size() int { return m.Size() } - func (m *QueryRawContractStateRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryRawContractStateRequest.DiscardUnknown(m) } @@ -464,11 +416,9 @@ func (*QueryRawContractStateResponse) ProtoMessage() {} func (*QueryRawContractStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{9} } - func (m *QueryRawContractStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryRawContractStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryRawContractStateResponse.Marshal(b, m, deterministic) @@ -481,15 +431,12 @@ func (m *QueryRawContractStateResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } - func (m *QueryRawContractStateResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryRawContractStateResponse.Merge(m, src) } - func (m *QueryRawContractStateResponse) XXX_Size() int { return m.Size() } - func (m *QueryRawContractStateResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryRawContractStateResponse.DiscardUnknown(m) } @@ -511,11 +458,9 @@ func (*QuerySmartContractStateRequest) ProtoMessage() {} func (*QuerySmartContractStateRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{10} } - func (m *QuerySmartContractStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QuerySmartContractStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QuerySmartContractStateRequest.Marshal(b, m, deterministic) @@ -528,15 +473,12 @@ func (m *QuerySmartContractStateRequest) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *QuerySmartContractStateRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QuerySmartContractStateRequest.Merge(m, src) } - func (m *QuerySmartContractStateRequest) XXX_Size() int { return m.Size() } - func (m *QuerySmartContractStateRequest) XXX_DiscardUnknown() { xxx_messageInfo_QuerySmartContractStateRequest.DiscardUnknown(m) } @@ -556,11 +498,9 @@ func (*QuerySmartContractStateResponse) ProtoMessage() {} func (*QuerySmartContractStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{11} } - func (m *QuerySmartContractStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QuerySmartContractStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QuerySmartContractStateResponse.Marshal(b, m, deterministic) @@ -573,15 +513,12 @@ func (m *QuerySmartContractStateResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } - func (m *QuerySmartContractStateResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QuerySmartContractStateResponse.Merge(m, src) } - func (m *QuerySmartContractStateResponse) XXX_Size() int { return m.Size() } - func (m *QuerySmartContractStateResponse) XXX_DiscardUnknown() { xxx_messageInfo_QuerySmartContractStateResponse.DiscardUnknown(m) } @@ -599,11 +536,9 @@ func (*QueryCodeRequest) ProtoMessage() {} func (*QueryCodeRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{12} } - func (m *QueryCodeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCodeRequest.Marshal(b, m, deterministic) @@ -616,15 +551,12 @@ func (m *QueryCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } - func (m *QueryCodeRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCodeRequest.Merge(m, src) } - func (m *QueryCodeRequest) XXX_Size() int { return m.Size() } - func (m *QueryCodeRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryCodeRequest.DiscardUnknown(m) } @@ -645,11 +577,9 @@ func (*CodeInfoResponse) ProtoMessage() {} func (*CodeInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{13} } - func (m *CodeInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *CodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CodeInfoResponse.Marshal(b, m, deterministic) @@ -662,15 +592,12 @@ func (m *CodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } - func (m *CodeInfoResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_CodeInfoResponse.Merge(m, src) } - func (m *CodeInfoResponse) XXX_Size() int { return m.Size() } - func (m *CodeInfoResponse) XXX_DiscardUnknown() { xxx_messageInfo_CodeInfoResponse.DiscardUnknown(m) } @@ -689,11 +616,9 @@ func (*QueryCodeResponse) ProtoMessage() {} func (*QueryCodeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{14} } - func (m *QueryCodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCodeResponse.Marshal(b, m, deterministic) @@ -706,15 +631,12 @@ func (m *QueryCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } - func (m *QueryCodeResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCodeResponse.Merge(m, src) } - func (m *QueryCodeResponse) XXX_Size() int { return m.Size() } - func (m *QueryCodeResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryCodeResponse.DiscardUnknown(m) } @@ -733,11 +655,9 @@ func (*QueryCodesRequest) ProtoMessage() {} func (*QueryCodesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{15} } - func (m *QueryCodesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCodesRequest.Marshal(b, m, deterministic) @@ -750,15 +670,12 @@ func (m *QueryCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } - func (m *QueryCodesRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCodesRequest.Merge(m, src) } - func (m *QueryCodesRequest) XXX_Size() int { return m.Size() } - func (m *QueryCodesRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryCodesRequest.DiscardUnknown(m) } @@ -778,11 +695,9 @@ func (*QueryCodesResponse) ProtoMessage() {} func (*QueryCodesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{16} } - func (m *QueryCodesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCodesResponse.Marshal(b, m, deterministic) @@ -795,15 +710,12 @@ func (m *QueryCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *QueryCodesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCodesResponse.Merge(m, src) } - func (m *QueryCodesResponse) XXX_Size() int { return m.Size() } - func (m *QueryCodesResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryCodesResponse.DiscardUnknown(m) } @@ -823,11 +735,9 @@ func (*QueryPinnedCodesRequest) ProtoMessage() {} func (*QueryPinnedCodesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{17} } - func (m *QueryPinnedCodesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryPinnedCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPinnedCodesRequest.Marshal(b, m, deterministic) @@ -840,15 +750,12 @@ func (m *QueryPinnedCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *QueryPinnedCodesRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPinnedCodesRequest.Merge(m, src) } - func (m *QueryPinnedCodesRequest) XXX_Size() int { return m.Size() } - func (m *QueryPinnedCodesRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryPinnedCodesRequest.DiscardUnknown(m) } @@ -869,11 +776,9 @@ func (*QueryPinnedCodesResponse) ProtoMessage() {} func (*QueryPinnedCodesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{18} } - func (m *QueryPinnedCodesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryPinnedCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPinnedCodesResponse.Marshal(b, m, deterministic) @@ -886,15 +791,12 @@ func (m *QueryPinnedCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } - func (m *QueryPinnedCodesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPinnedCodesResponse.Merge(m, src) } - func (m *QueryPinnedCodesResponse) XXX_Size() int { return m.Size() } - func (m *QueryPinnedCodesResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryPinnedCodesResponse.DiscardUnknown(m) } @@ -902,7 +804,8 @@ func (m *QueryPinnedCodesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPinnedCodesResponse proto.InternalMessageInfo // QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct{} +type QueryParamsRequest struct { +} func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } @@ -910,11 +813,9 @@ func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{19} } - func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) @@ -927,15 +828,12 @@ func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryParamsRequest.Merge(m, src) } - func (m *QueryParamsRequest) XXX_Size() int { return m.Size() } - func (m *QueryParamsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) } @@ -954,11 +852,9 @@ func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{20} } - func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) @@ -971,15 +867,12 @@ func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryParamsResponse.Merge(m, src) } - func (m *QueryParamsResponse) XXX_Size() int { return m.Size() } - func (m *QueryParamsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) } @@ -1001,11 +894,9 @@ func (*QueryContractsByCreatorRequest) ProtoMessage() {} func (*QueryContractsByCreatorRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{21} } - func (m *QueryContractsByCreatorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractsByCreatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractsByCreatorRequest.Marshal(b, m, deterministic) @@ -1018,15 +909,12 @@ func (m *QueryContractsByCreatorRequest) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *QueryContractsByCreatorRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractsByCreatorRequest.Merge(m, src) } - func (m *QueryContractsByCreatorRequest) XXX_Size() int { return m.Size() } - func (m *QueryContractsByCreatorRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractsByCreatorRequest.DiscardUnknown(m) } @@ -1048,11 +936,9 @@ func (*QueryContractsByCreatorResponse) ProtoMessage() {} func (*QueryContractsByCreatorResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{22} } - func (m *QueryContractsByCreatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractsByCreatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractsByCreatorResponse.Marshal(b, m, deterministic) @@ -1065,15 +951,12 @@ func (m *QueryContractsByCreatorResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } - func (m *QueryContractsByCreatorResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractsByCreatorResponse.Merge(m, src) } - func (m *QueryContractsByCreatorResponse) XXX_Size() int { return m.Size() } - func (m *QueryContractsByCreatorResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractsByCreatorResponse.DiscardUnknown(m) } @@ -1223,7 +1106,6 @@ func (this *QueryContractInfoResponse) Equal(that interface{}) bool { } return true } - func (this *CodeInfoResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1257,7 +1139,6 @@ func (this *CodeInfoResponse) Equal(that interface{}) bool { } return true } - func (this *QueryCodeResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1287,10 +1168,8 @@ func (this *QueryCodeResponse) Equal(that interface{}) bool { } // Reference imports to suppress errors if they are not otherwise used. -var ( - _ context.Context - _ grpc.ClientConn -) +var _ context.Context +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -1458,48 +1337,39 @@ type QueryServer interface { } // UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct{} +type UnimplementedQueryServer struct { +} func (*UnimplementedQueryServer) ContractInfo(ctx context.Context, req *QueryContractInfoRequest) (*QueryContractInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ContractInfo not implemented") } - func (*UnimplementedQueryServer) ContractHistory(ctx context.Context, req *QueryContractHistoryRequest) (*QueryContractHistoryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ContractHistory not implemented") } - func (*UnimplementedQueryServer) ContractsByCode(ctx context.Context, req *QueryContractsByCodeRequest) (*QueryContractsByCodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ContractsByCode not implemented") } - func (*UnimplementedQueryServer) AllContractState(ctx context.Context, req *QueryAllContractStateRequest) (*QueryAllContractStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllContractState not implemented") } - func (*UnimplementedQueryServer) RawContractState(ctx context.Context, req *QueryRawContractStateRequest) (*QueryRawContractStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RawContractState not implemented") } - func (*UnimplementedQueryServer) SmartContractState(ctx context.Context, req *QuerySmartContractStateRequest) (*QuerySmartContractStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SmartContractState not implemented") } - func (*UnimplementedQueryServer) Code(ctx context.Context, req *QueryCodeRequest) (*QueryCodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Code not implemented") } - func (*UnimplementedQueryServer) Codes(ctx context.Context, req *QueryCodesRequest) (*QueryCodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Codes not implemented") } - func (*UnimplementedQueryServer) PinnedCodes(ctx context.Context, req *QueryPinnedCodesRequest) (*QueryPinnedCodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PinnedCodes not implemented") } - func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } - func (*UnimplementedQueryServer) ContractsByCreator(ctx context.Context, req *QueryContractsByCreatorRequest) (*QueryContractsByCreatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ContractsByCreator not implemented") } @@ -2676,7 +2546,6 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *QueryContractInfoRequest) Size() (n int) { if m == nil { return 0 @@ -3047,11 +2916,9 @@ func (m *QueryContractsByCreatorResponse) Size() (n int) { func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *QueryContractInfoRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3134,7 +3001,6 @@ func (m *QueryContractInfoRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3250,7 +3116,6 @@ func (m *QueryContractInfoResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractHistoryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3369,7 +3234,6 @@ func (m *QueryContractHistoryRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractHistoryResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3490,7 +3354,6 @@ func (m *QueryContractHistoryResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCodeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3596,7 +3459,6 @@ func (m *QueryContractsByCodeRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3715,7 +3577,6 @@ func (m *QueryContractsByCodeResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryAllContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3834,7 +3695,6 @@ func (m *QueryAllContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryAllContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3955,7 +3815,6 @@ func (m *QueryAllContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryRawContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4072,7 +3931,6 @@ func (m *QueryRawContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryRawContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4157,7 +4015,6 @@ func (m *QueryRawContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QuerySmartContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4274,7 +4131,6 @@ func (m *QuerySmartContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QuerySmartContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4359,7 +4215,6 @@ func (m *QuerySmartContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4429,7 +4284,6 @@ func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *CodeInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4598,7 +4452,6 @@ func (m *CodeInfoResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4719,7 +4572,6 @@ func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4806,7 +4658,6 @@ func (m *QueryCodesRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4927,7 +4778,6 @@ func (m *QueryCodesResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryPinnedCodesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5014,7 +4864,6 @@ func (m *QueryPinnedCodesRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryPinnedCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5177,7 +5026,6 @@ func (m *QueryPinnedCodesResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5228,7 +5076,6 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5312,7 +5159,6 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCreatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5431,7 +5277,6 @@ func (m *QueryContractsByCreatorRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCreatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5550,7 +5395,6 @@ func (m *QueryContractsByCreatorResponse) Unmarshal(dAtA []byte) error { } return nil } - func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/query.pb.gw.go b/x/wasm/types/query.pb.gw.go index 32f3fd25cd..696252ab02 100644 --- a/x/wasm/types/query.pb.gw.go +++ b/x/wasm/types/query.pb.gw.go @@ -25,15 +25,13 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = descriptor.ForMessage - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryContractInfoRequest @@ -59,6 +57,7 @@ func request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.ContractInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -85,9 +84,12 @@ func local_request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.M msg, err := server.ContractInfo(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_ContractHistory_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_Query_ContractHistory_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_Query_ContractHistory_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryContractHistoryRequest @@ -120,6 +122,7 @@ func request_Query_ContractHistory_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ContractHistory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_ContractHistory_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -153,9 +156,12 @@ func local_request_Query_ContractHistory_0(ctx context.Context, marshaler runtim msg, err := server.ContractHistory(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_ContractsByCode_0 = &utilities.DoubleArray{Encoding: map[string]int{"code_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_Query_ContractsByCode_0 = &utilities.DoubleArray{Encoding: map[string]int{"code_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_Query_ContractsByCode_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryContractsByCodeRequest @@ -188,6 +194,7 @@ func request_Query_ContractsByCode_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ContractsByCode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_ContractsByCode_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -221,9 +228,12 @@ func local_request_Query_ContractsByCode_0(ctx context.Context, marshaler runtim msg, err := server.ContractsByCode(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_AllContractState_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_Query_AllContractState_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_Query_AllContractState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAllContractStateRequest @@ -256,6 +266,7 @@ func request_Query_AllContractState_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AllContractState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_AllContractState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -289,6 +300,7 @@ func local_request_Query_AllContractState_0(ctx context.Context, marshaler runti msg, err := server.AllContractState(ctx, &protoReq) return msg, metadata, err + } func request_Query_RawContractState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -326,6 +338,7 @@ func request_Query_RawContractState_0(ctx context.Context, marshaler runtime.Mar msg, err := client.RawContractState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_RawContractState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -363,6 +376,7 @@ func local_request_Query_RawContractState_0(ctx context.Context, marshaler runti msg, err := server.RawContractState(ctx, &protoReq) return msg, metadata, err + } func request_Query_SmartContractState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -400,6 +414,7 @@ func request_Query_SmartContractState_0(ctx context.Context, marshaler runtime.M msg, err := client.SmartContractState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_SmartContractState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -437,6 +452,7 @@ func local_request_Query_SmartContractState_0(ctx context.Context, marshaler run msg, err := server.SmartContractState(ctx, &protoReq) return msg, metadata, err + } func request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -463,6 +479,7 @@ func request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, clie msg, err := client.Code(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -489,9 +506,12 @@ func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler msg, err := server.Code(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_Codes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_Query_Codes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryCodesRequest @@ -506,6 +526,7 @@ func request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshaler, cli msg, err := client.Codes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -521,9 +542,12 @@ func local_request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshale msg, err := server.Codes(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_PinnedCodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_Query_PinnedCodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_Query_PinnedCodes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPinnedCodesRequest @@ -538,6 +562,7 @@ func request_Query_PinnedCodes_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.PinnedCodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_PinnedCodes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -553,6 +578,7 @@ func local_request_Query_PinnedCodes_0(ctx context.Context, marshaler runtime.Ma msg, err := server.PinnedCodes(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) { @@ -561,6 +587,7 @@ func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, cl msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -569,9 +596,12 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal msg, err := server.Params(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_ContractsByCreator_0 = &utilities.DoubleArray{Encoding: map[string]int{"creator_address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_Query_ContractsByCreator_0 = &utilities.DoubleArray{Encoding: map[string]int{"creator_address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_Query_ContractsByCreator_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryContractsByCreatorRequest @@ -604,6 +634,7 @@ func request_Query_ContractsByCreator_0(ctx context.Context, marshaler runtime.M msg, err := client.ContractsByCreator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_ContractsByCreator_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -637,6 +668,7 @@ func local_request_Query_ContractsByCreator_0(ctx context.Context, marshaler run msg, err := server.ContractsByCreator(ctx, &protoReq) return msg, metadata, err + } // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". @@ -644,6 +676,7 @@ func local_request_Query_ContractsByCreator_0(ctx context.Context, marshaler run // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + mux.Handle("GET", pattern_Query_ContractInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -664,6 +697,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_ContractInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -686,6 +720,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_ContractHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractsByCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -708,6 +743,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_ContractsByCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_AllContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -730,6 +766,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_AllContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_RawContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -752,6 +789,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_RawContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_SmartContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -774,6 +812,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_SmartContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -796,6 +835,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Codes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -818,6 +858,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Codes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_PinnedCodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -840,6 +881,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_PinnedCodes_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) { @@ -862,6 +904,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractsByCreator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -884,6 +927,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_ContractsByCreator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -926,6 +970,7 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + mux.Handle("GET", pattern_Query_ContractInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -943,6 +988,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_ContractInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -962,6 +1008,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_ContractHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractsByCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -981,6 +1028,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_ContractsByCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_AllContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1000,6 +1048,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_AllContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_RawContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1019,6 +1068,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_RawContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_SmartContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1038,6 +1088,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_SmartContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1057,6 +1108,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Codes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1076,6 +1128,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Codes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_PinnedCodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1095,6 +1148,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_PinnedCodes_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) { @@ -1114,6 +1168,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractsByCreator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1133,6 +1188,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_ContractsByCreator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/x/wasm/types/tx.pb.go b/x/wasm/types/tx.pb.go index 5d4994afbd..9e8c5b150e 100644 --- a/x/wasm/types/tx.pb.go +++ b/x/wasm/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -18,14 +14,15 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -50,11 +47,9 @@ func (*MsgStoreCode) ProtoMessage() {} func (*MsgStoreCode) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{0} } - func (m *MsgStoreCode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgStoreCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgStoreCode.Marshal(b, m, deterministic) @@ -67,15 +62,12 @@ func (m *MsgStoreCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *MsgStoreCode) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgStoreCode.Merge(m, src) } - func (m *MsgStoreCode) XXX_Size() int { return m.Size() } - func (m *MsgStoreCode) XXX_DiscardUnknown() { xxx_messageInfo_MsgStoreCode.DiscardUnknown(m) } @@ -96,11 +88,9 @@ func (*MsgStoreCodeResponse) ProtoMessage() {} func (*MsgStoreCodeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{1} } - func (m *MsgStoreCodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgStoreCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgStoreCodeResponse.Marshal(b, m, deterministic) @@ -113,15 +103,12 @@ func (m *MsgStoreCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } - func (m *MsgStoreCodeResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgStoreCodeResponse.Merge(m, src) } - func (m *MsgStoreCodeResponse) XXX_Size() int { return m.Size() } - func (m *MsgStoreCodeResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgStoreCodeResponse.DiscardUnknown(m) } @@ -151,11 +138,9 @@ func (*MsgInstantiateContract) ProtoMessage() {} func (*MsgInstantiateContract) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{2} } - func (m *MsgInstantiateContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInstantiateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInstantiateContract.Marshal(b, m, deterministic) @@ -168,15 +153,12 @@ func (m *MsgInstantiateContract) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *MsgInstantiateContract) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInstantiateContract.Merge(m, src) } - func (m *MsgInstantiateContract) XXX_Size() int { return m.Size() } - func (m *MsgInstantiateContract) XXX_DiscardUnknown() { xxx_messageInfo_MsgInstantiateContract.DiscardUnknown(m) } @@ -211,11 +193,9 @@ func (*MsgInstantiateContract2) ProtoMessage() {} func (*MsgInstantiateContract2) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{3} } - func (m *MsgInstantiateContract2) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInstantiateContract2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInstantiateContract2.Marshal(b, m, deterministic) @@ -228,15 +208,12 @@ func (m *MsgInstantiateContract2) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *MsgInstantiateContract2) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInstantiateContract2.Merge(m, src) } - func (m *MsgInstantiateContract2) XXX_Size() int { return m.Size() } - func (m *MsgInstantiateContract2) XXX_DiscardUnknown() { xxx_messageInfo_MsgInstantiateContract2.DiscardUnknown(m) } @@ -257,11 +234,9 @@ func (*MsgInstantiateContractResponse) ProtoMessage() {} func (*MsgInstantiateContractResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{4} } - func (m *MsgInstantiateContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInstantiateContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInstantiateContractResponse.Marshal(b, m, deterministic) @@ -274,15 +249,12 @@ func (m *MsgInstantiateContractResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *MsgInstantiateContractResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInstantiateContractResponse.Merge(m, src) } - func (m *MsgInstantiateContractResponse) XXX_Size() int { return m.Size() } - func (m *MsgInstantiateContractResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgInstantiateContractResponse.DiscardUnknown(m) } @@ -303,11 +275,9 @@ func (*MsgInstantiateContract2Response) ProtoMessage() {} func (*MsgInstantiateContract2Response) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{5} } - func (m *MsgInstantiateContract2Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInstantiateContract2Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInstantiateContract2Response.Marshal(b, m, deterministic) @@ -320,15 +290,12 @@ func (m *MsgInstantiateContract2Response) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } - func (m *MsgInstantiateContract2Response) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInstantiateContract2Response.Merge(m, src) } - func (m *MsgInstantiateContract2Response) XXX_Size() int { return m.Size() } - func (m *MsgInstantiateContract2Response) XXX_DiscardUnknown() { xxx_messageInfo_MsgInstantiateContract2Response.DiscardUnknown(m) } @@ -353,11 +320,9 @@ func (*MsgExecuteContract) ProtoMessage() {} func (*MsgExecuteContract) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{6} } - func (m *MsgExecuteContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgExecuteContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgExecuteContract.Marshal(b, m, deterministic) @@ -370,15 +335,12 @@ func (m *MsgExecuteContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *MsgExecuteContract) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgExecuteContract.Merge(m, src) } - func (m *MsgExecuteContract) XXX_Size() int { return m.Size() } - func (m *MsgExecuteContract) XXX_DiscardUnknown() { xxx_messageInfo_MsgExecuteContract.DiscardUnknown(m) } @@ -397,11 +359,9 @@ func (*MsgExecuteContractResponse) ProtoMessage() {} func (*MsgExecuteContractResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{7} } - func (m *MsgExecuteContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgExecuteContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgExecuteContractResponse.Marshal(b, m, deterministic) @@ -414,15 +374,12 @@ func (m *MsgExecuteContractResponse) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } - func (m *MsgExecuteContractResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgExecuteContractResponse.Merge(m, src) } - func (m *MsgExecuteContractResponse) XXX_Size() int { return m.Size() } - func (m *MsgExecuteContractResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgExecuteContractResponse.DiscardUnknown(m) } @@ -447,11 +404,9 @@ func (*MsgMigrateContract) ProtoMessage() {} func (*MsgMigrateContract) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{8} } - func (m *MsgMigrateContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgMigrateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgMigrateContract.Marshal(b, m, deterministic) @@ -464,15 +419,12 @@ func (m *MsgMigrateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *MsgMigrateContract) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgMigrateContract.Merge(m, src) } - func (m *MsgMigrateContract) XXX_Size() int { return m.Size() } - func (m *MsgMigrateContract) XXX_DiscardUnknown() { xxx_messageInfo_MsgMigrateContract.DiscardUnknown(m) } @@ -492,11 +444,9 @@ func (*MsgMigrateContractResponse) ProtoMessage() {} func (*MsgMigrateContractResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{9} } - func (m *MsgMigrateContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgMigrateContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgMigrateContractResponse.Marshal(b, m, deterministic) @@ -509,15 +459,12 @@ func (m *MsgMigrateContractResponse) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } - func (m *MsgMigrateContractResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgMigrateContractResponse.Merge(m, src) } - func (m *MsgMigrateContractResponse) XXX_Size() int { return m.Size() } - func (m *MsgMigrateContractResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgMigrateContractResponse.DiscardUnknown(m) } @@ -540,11 +487,9 @@ func (*MsgUpdateAdmin) ProtoMessage() {} func (*MsgUpdateAdmin) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{10} } - func (m *MsgUpdateAdmin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateAdmin.Marshal(b, m, deterministic) @@ -557,15 +502,12 @@ func (m *MsgUpdateAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } - func (m *MsgUpdateAdmin) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateAdmin.Merge(m, src) } - func (m *MsgUpdateAdmin) XXX_Size() int { return m.Size() } - func (m *MsgUpdateAdmin) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateAdmin.DiscardUnknown(m) } @@ -573,7 +515,8 @@ func (m *MsgUpdateAdmin) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateAdmin proto.InternalMessageInfo // MsgUpdateAdminResponse returns empty data -type MsgUpdateAdminResponse struct{} +type MsgUpdateAdminResponse struct { +} func (m *MsgUpdateAdminResponse) Reset() { *m = MsgUpdateAdminResponse{} } func (m *MsgUpdateAdminResponse) String() string { return proto.CompactTextString(m) } @@ -581,11 +524,9 @@ func (*MsgUpdateAdminResponse) ProtoMessage() {} func (*MsgUpdateAdminResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{11} } - func (m *MsgUpdateAdminResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateAdminResponse.Marshal(b, m, deterministic) @@ -598,15 +539,12 @@ func (m *MsgUpdateAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *MsgUpdateAdminResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateAdminResponse.Merge(m, src) } - func (m *MsgUpdateAdminResponse) XXX_Size() int { return m.Size() } - func (m *MsgUpdateAdminResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateAdminResponse.DiscardUnknown(m) } @@ -627,11 +565,9 @@ func (*MsgClearAdmin) ProtoMessage() {} func (*MsgClearAdmin) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{12} } - func (m *MsgClearAdmin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgClearAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgClearAdmin.Marshal(b, m, deterministic) @@ -644,15 +580,12 @@ func (m *MsgClearAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *MsgClearAdmin) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgClearAdmin.Merge(m, src) } - func (m *MsgClearAdmin) XXX_Size() int { return m.Size() } - func (m *MsgClearAdmin) XXX_DiscardUnknown() { xxx_messageInfo_MsgClearAdmin.DiscardUnknown(m) } @@ -660,7 +593,8 @@ func (m *MsgClearAdmin) XXX_DiscardUnknown() { var xxx_messageInfo_MsgClearAdmin proto.InternalMessageInfo // MsgClearAdminResponse returns empty data -type MsgClearAdminResponse struct{} +type MsgClearAdminResponse struct { +} func (m *MsgClearAdminResponse) Reset() { *m = MsgClearAdminResponse{} } func (m *MsgClearAdminResponse) String() string { return proto.CompactTextString(m) } @@ -668,11 +602,9 @@ func (*MsgClearAdminResponse) ProtoMessage() {} func (*MsgClearAdminResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{13} } - func (m *MsgClearAdminResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgClearAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgClearAdminResponse.Marshal(b, m, deterministic) @@ -685,15 +617,12 @@ func (m *MsgClearAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } - func (m *MsgClearAdminResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgClearAdminResponse.Merge(m, src) } - func (m *MsgClearAdminResponse) XXX_Size() int { return m.Size() } - func (m *MsgClearAdminResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgClearAdminResponse.DiscardUnknown(m) } @@ -716,11 +645,9 @@ func (*MsgUpdateInstantiateConfig) ProtoMessage() {} func (*MsgUpdateInstantiateConfig) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{14} } - func (m *MsgUpdateInstantiateConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateInstantiateConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateInstantiateConfig.Marshal(b, m, deterministic) @@ -733,15 +660,12 @@ func (m *MsgUpdateInstantiateConfig) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } - func (m *MsgUpdateInstantiateConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateInstantiateConfig.Merge(m, src) } - func (m *MsgUpdateInstantiateConfig) XXX_Size() int { return m.Size() } - func (m *MsgUpdateInstantiateConfig) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateInstantiateConfig.DiscardUnknown(m) } @@ -749,7 +673,8 @@ func (m *MsgUpdateInstantiateConfig) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateInstantiateConfig proto.InternalMessageInfo // MsgUpdateInstantiateConfigResponse returns empty data -type MsgUpdateInstantiateConfigResponse struct{} +type MsgUpdateInstantiateConfigResponse struct { +} func (m *MsgUpdateInstantiateConfigResponse) Reset() { *m = MsgUpdateInstantiateConfigResponse{} } func (m *MsgUpdateInstantiateConfigResponse) String() string { return proto.CompactTextString(m) } @@ -757,11 +682,9 @@ func (*MsgUpdateInstantiateConfigResponse) ProtoMessage() {} func (*MsgUpdateInstantiateConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{15} } - func (m *MsgUpdateInstantiateConfigResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateInstantiateConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateInstantiateConfigResponse.Marshal(b, m, deterministic) @@ -774,15 +697,12 @@ func (m *MsgUpdateInstantiateConfigResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } - func (m *MsgUpdateInstantiateConfigResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateInstantiateConfigResponse.Merge(m, src) } - func (m *MsgUpdateInstantiateConfigResponse) XXX_Size() int { return m.Size() } - func (m *MsgUpdateInstantiateConfigResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateInstantiateConfigResponse.DiscardUnknown(m) } @@ -872,10 +792,8 @@ var fileDescriptor_4f74d82755520264 = []byte{ } // Reference imports to suppress errors if they are not otherwise used. -var ( - _ context.Context - _ grpc.ClientConn -) +var _ context.Context +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -1008,36 +926,30 @@ type MsgServer interface { } // UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct{} +type UnimplementedMsgServer struct { +} func (*UnimplementedMsgServer) StoreCode(ctx context.Context, req *MsgStoreCode) (*MsgStoreCodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StoreCode not implemented") } - func (*UnimplementedMsgServer) InstantiateContract(ctx context.Context, req *MsgInstantiateContract) (*MsgInstantiateContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InstantiateContract not implemented") } - func (*UnimplementedMsgServer) InstantiateContract2(ctx context.Context, req *MsgInstantiateContract2) (*MsgInstantiateContract2Response, error) { return nil, status.Errorf(codes.Unimplemented, "method InstantiateContract2 not implemented") } - func (*UnimplementedMsgServer) ExecuteContract(ctx context.Context, req *MsgExecuteContract) (*MsgExecuteContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteContract not implemented") } - func (*UnimplementedMsgServer) MigrateContract(ctx context.Context, req *MsgMigrateContract) (*MsgMigrateContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MigrateContract not implemented") } - func (*UnimplementedMsgServer) UpdateAdmin(ctx context.Context, req *MsgUpdateAdmin) (*MsgUpdateAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateAdmin not implemented") } - func (*UnimplementedMsgServer) ClearAdmin(ctx context.Context, req *MsgClearAdmin) (*MsgClearAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClearAdmin not implemented") } - func (*UnimplementedMsgServer) UpdateInstantiateConfig(ctx context.Context, req *MsgUpdateInstantiateConfig) (*MsgUpdateInstantiateConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateInstantiateConfig not implemented") } @@ -1921,7 +1833,6 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *MsgStoreCode) Size() (n int) { if m == nil { return 0 @@ -2233,11 +2144,9 @@ func (m *MsgUpdateInstantiateConfigResponse) Size() (n int) { func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *MsgStoreCode) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2390,7 +2299,6 @@ func (m *MsgStoreCode) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2494,7 +2402,6 @@ func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2728,7 +2635,6 @@ func (m *MsgInstantiateContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContract2) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3016,7 +2922,6 @@ func (m *MsgInstantiateContract2) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3133,7 +3038,6 @@ func (m *MsgInstantiateContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContract2Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3250,7 +3154,6 @@ func (m *MsgInstantiateContract2Response) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3433,7 +3336,6 @@ func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgExecuteContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3518,7 +3420,6 @@ func (m *MsgExecuteContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgMigrateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3686,7 +3587,6 @@ func (m *MsgMigrateContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgMigrateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3771,7 +3671,6 @@ func (m *MsgMigrateContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateAdmin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3918,7 +3817,6 @@ func (m *MsgUpdateAdmin) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3969,7 +3867,6 @@ func (m *MsgUpdateAdminResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgClearAdmin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4084,7 +3981,6 @@ func (m *MsgClearAdmin) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgClearAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4135,7 +4031,6 @@ func (m *MsgClearAdminResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateInstantiateConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4273,7 +4168,6 @@ func (m *MsgUpdateInstantiateConfig) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateInstantiateConfigResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4324,7 +4218,6 @@ func (m *MsgUpdateInstantiateConfigResponse) Unmarshal(dAtA []byte) error { } return nil } - func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/tx_test.go b/x/wasm/types/tx_test.go index 57e36a4675..86073395ff 100644 --- a/x/wasm/types/tx_test.go +++ b/x/wasm/types/tx_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" @@ -15,7 +15,7 @@ import ( const firstCodeID = 1 func TestStoreCodeValidation(t *testing.T) { - bad, err := sdk.AccAddressFromHex("012345") + bad, err := sdk.AccAddressFromHexUnsafe("012345") require.NoError(t, err) badAddress := bad.String() // proper address size @@ -79,7 +79,7 @@ func TestStoreCodeValidation(t *testing.T) { } func TestInstantiateContractValidation(t *testing.T) { - bad, err := sdk.AccAddressFromHex("012345") + bad, err := sdk.AccAddressFromHexUnsafe("012345") require.NoError(t, err) badAddress := bad.String() // proper address size @@ -187,7 +187,7 @@ func TestInstantiateContractValidation(t *testing.T) { } func TestInstantiateContract2Validation(t *testing.T) { - bad, err := sdk.AccAddressFromHex("012345") + bad, err := sdk.AccAddressFromHexUnsafe("012345") require.NoError(t, err) badAddress := bad.String() // proper address size @@ -323,7 +323,7 @@ func TestInstantiateContract2Validation(t *testing.T) { } func TestExecuteContractValidation(t *testing.T) { - bad, err := sdk.AccAddressFromHex("012345") + bad, err := sdk.AccAddressFromHexUnsafe("012345") require.NoError(t, err) badAddress := bad.String() // proper address size @@ -432,7 +432,7 @@ func TestExecuteContractValidation(t *testing.T) { } func TestMsgUpdateAdministrator(t *testing.T) { - bad, err := sdk.AccAddressFromHex("012345") + bad, err := sdk.AccAddressFromHexUnsafe("012345") require.NoError(t, err) badAddress := bad.String() // proper address size @@ -504,7 +504,7 @@ func TestMsgUpdateAdministrator(t *testing.T) { } func TestMsgClearAdministrator(t *testing.T) { - bad, err := sdk.AccAddressFromHex("012345") + bad, err := sdk.AccAddressFromHexUnsafe("012345") require.NoError(t, err) badAddress := bad.String() // proper address size @@ -555,7 +555,7 @@ func TestMsgClearAdministrator(t *testing.T) { } func TestMsgMigrateContract(t *testing.T) { - bad, err := sdk.AccAddressFromHex("012345") + bad, err := sdk.AccAddressFromHexUnsafe("012345") require.NoError(t, err) badAddress := bad.String() // proper address size @@ -681,7 +681,7 @@ func TestMsgJsonSignBytes(t *testing.T) { } func TestMsgUpdateInstantiateConfig(t *testing.T) { - bad, err := sdk.AccAddressFromHex("012345") + bad, err := sdk.AccAddressFromHexUnsafe("012345") require.NoError(t, err) badAddress := bad.String() // proper address size diff --git a/x/wasm/types/types.pb.go b/x/wasm/types/types.pb.go index 89351f716f..97086954aa 100644 --- a/x/wasm/types/types.pb.go +++ b/x/wasm/types/types.pb.go @@ -6,23 +6,20 @@ package types import ( bytes "bytes" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -114,11 +111,9 @@ func (*AccessTypeParam) ProtoMessage() {} func (*AccessTypeParam) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{0} } - func (m *AccessTypeParam) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AccessTypeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AccessTypeParam.Marshal(b, m, deterministic) @@ -131,15 +126,12 @@ func (m *AccessTypeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } - func (m *AccessTypeParam) XXX_Merge(src proto.Message) { xxx_messageInfo_AccessTypeParam.Merge(m, src) } - func (m *AccessTypeParam) XXX_Size() int { return m.Size() } - func (m *AccessTypeParam) XXX_DiscardUnknown() { xxx_messageInfo_AccessTypeParam.DiscardUnknown(m) } @@ -161,11 +153,9 @@ func (*AccessConfig) ProtoMessage() {} func (*AccessConfig) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{1} } - func (m *AccessConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AccessConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AccessConfig.Marshal(b, m, deterministic) @@ -178,15 +168,12 @@ func (m *AccessConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *AccessConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_AccessConfig.Merge(m, src) } - func (m *AccessConfig) XXX_Size() int { return m.Size() } - func (m *AccessConfig) XXX_DiscardUnknown() { xxx_messageInfo_AccessConfig.DiscardUnknown(m) } @@ -204,11 +191,9 @@ func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{2} } - 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) @@ -221,15 +206,12 @@ func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 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) } @@ -252,11 +234,9 @@ func (*CodeInfo) ProtoMessage() {} func (*CodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{3} } - func (m *CodeInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *CodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CodeInfo.Marshal(b, m, deterministic) @@ -269,15 +249,12 @@ func (m *CodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *CodeInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_CodeInfo.Merge(m, src) } - func (m *CodeInfo) XXX_Size() int { return m.Size() } - func (m *CodeInfo) XXX_DiscardUnknown() { xxx_messageInfo_CodeInfo.DiscardUnknown(m) } @@ -308,11 +285,9 @@ func (*ContractInfo) ProtoMessage() {} func (*ContractInfo) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{4} } - func (m *ContractInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractInfo.Marshal(b, m, deterministic) @@ -325,15 +300,12 @@ func (m *ContractInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *ContractInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractInfo.Merge(m, src) } - func (m *ContractInfo) XXX_Size() int { return m.Size() } - func (m *ContractInfo) XXX_DiscardUnknown() { xxx_messageInfo_ContractInfo.DiscardUnknown(m) } @@ -356,11 +328,9 @@ func (*ContractCodeHistoryEntry) ProtoMessage() {} func (*ContractCodeHistoryEntry) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{5} } - func (m *ContractCodeHistoryEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractCodeHistoryEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractCodeHistoryEntry.Marshal(b, m, deterministic) @@ -373,15 +343,12 @@ func (m *ContractCodeHistoryEntry) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } - func (m *ContractCodeHistoryEntry) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractCodeHistoryEntry.Merge(m, src) } - func (m *ContractCodeHistoryEntry) XXX_Size() int { return m.Size() } - func (m *ContractCodeHistoryEntry) XXX_DiscardUnknown() { xxx_messageInfo_ContractCodeHistoryEntry.DiscardUnknown(m) } @@ -404,11 +371,9 @@ func (*AbsoluteTxPosition) ProtoMessage() {} func (*AbsoluteTxPosition) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{6} } - func (m *AbsoluteTxPosition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AbsoluteTxPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AbsoluteTxPosition.Marshal(b, m, deterministic) @@ -421,15 +386,12 @@ func (m *AbsoluteTxPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *AbsoluteTxPosition) XXX_Merge(src proto.Message) { xxx_messageInfo_AbsoluteTxPosition.Merge(m, src) } - func (m *AbsoluteTxPosition) XXX_Size() int { return m.Size() } - func (m *AbsoluteTxPosition) XXX_DiscardUnknown() { xxx_messageInfo_AbsoluteTxPosition.DiscardUnknown(m) } @@ -450,11 +412,9 @@ func (*Model) ProtoMessage() {} func (*Model) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{7} } - func (m *Model) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Model) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Model.Marshal(b, m, deterministic) @@ -467,15 +427,12 @@ func (m *Model) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Model) XXX_Merge(src proto.Message) { xxx_messageInfo_Model.Merge(m, src) } - func (m *Model) XXX_Size() int { return m.Size() } - func (m *Model) XXX_DiscardUnknown() { xxx_messageInfo_Model.DiscardUnknown(m) } @@ -599,7 +556,6 @@ func (this *AccessTypeParam) Equal(that interface{}) bool { } return true } - func (this *AccessConfig) Equal(that interface{}) bool { if that == nil { return this == nil @@ -635,7 +591,6 @@ func (this *AccessConfig) Equal(that interface{}) bool { } return true } - func (this *Params) Equal(that interface{}) bool { if that == nil { return this == nil @@ -663,7 +618,6 @@ func (this *Params) Equal(that interface{}) bool { } return true } - func (this *CodeInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -694,7 +648,6 @@ func (this *CodeInfo) Equal(that interface{}) bool { } return true } - func (this *ContractInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -737,7 +690,6 @@ func (this *ContractInfo) Equal(that interface{}) bool { } return true } - func (this *ContractCodeHistoryEntry) Equal(that interface{}) bool { if that == nil { return this == nil @@ -771,7 +723,6 @@ func (this *ContractCodeHistoryEntry) Equal(that interface{}) bool { } return true } - func (this *AbsoluteTxPosition) Equal(that interface{}) bool { if that == nil { return this == nil @@ -799,7 +750,6 @@ func (this *AbsoluteTxPosition) Equal(that interface{}) bool { } return true } - func (this *Model) Equal(that interface{}) bool { if that == nil { return this == nil @@ -827,7 +777,6 @@ func (this *Model) Equal(that interface{}) bool { } return true } - func (m *AccessTypeParam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1198,7 +1147,6 @@ func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *AccessTypeParam) Size() (n int) { if m == nil { return 0 @@ -1360,11 +1308,9 @@ func (m *Model) Size() (n int) { 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 *AccessTypeParam) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1434,7 +1380,6 @@ func (m *AccessTypeParam) Unmarshal(dAtA []byte) error { } return nil } - func (m *AccessConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1568,7 +1513,6 @@ func (m *AccessConfig) Unmarshal(dAtA []byte) error { } return nil } - func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1671,7 +1615,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } - func (m *CodeInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1821,7 +1764,6 @@ func (m *CodeInfo) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2091,7 +2033,6 @@ func (m *ContractInfo) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractCodeHistoryEntry) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2250,7 +2191,6 @@ func (m *ContractCodeHistoryEntry) Unmarshal(dAtA []byte) error { } return nil } - func (m *AbsoluteTxPosition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2339,7 +2279,6 @@ func (m *AbsoluteTxPosition) Unmarshal(dAtA []byte) error { } return nil } - func (m *Model) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2458,7 +2397,6 @@ func (m *Model) Unmarshal(dAtA []byte) error { } return nil } - func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/types_test.go b/x/wasm/types/types_test.go index 25df828023..4962bf5bf4 100644 --- a/x/wasm/types/types_test.go +++ b/x/wasm/types/types_test.go @@ -10,9 +10,8 @@ import ( wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/rand" @@ -33,7 +32,7 @@ func TestContractInfoValidateBasic(t *testing.T) { expError: true, }, "creator not an address": { - srcMutator: func(c *ContractInfo) { c.Creator = "invalid address" }, + srcMutator: func(c *ContractInfo) { c.Creator = invalidAddress }, expError: true, }, "admin empty": { @@ -41,7 +40,7 @@ func TestContractInfoValidateBasic(t *testing.T) { expError: false, }, "admin not an address": { - srcMutator: func(c *ContractInfo) { c.Admin = "invalid address" }, + srcMutator: func(c *ContractInfo) { c.Admin = invalidAddress }, expError: true, }, "label empty": { @@ -55,7 +54,7 @@ func TestContractInfoValidateBasic(t *testing.T) { "invalid extension": { srcMutator: func(c *ContractInfo) { // any protobuf type with ValidateBasic method - any, err := codectypes.NewAnyWithValue(&govtypes.TextProposal{}) + any, err := types.NewAnyWithValue(&govtypes.TextProposal{}) require.NoError(t, err) c.Extension = any }, @@ -64,7 +63,7 @@ func TestContractInfoValidateBasic(t *testing.T) { "not validatable extension": { srcMutator: func(c *ContractInfo) { // any protobuf type with ValidateBasic method - any, err := codectypes.NewAnyWithValue(&govtypes.Proposal{}) + any, err := types.NewAnyWithValue(&govtypes.Proposal{}) require.NoError(t, err) c.Extension = any }, @@ -228,7 +227,7 @@ func TestContractInfoReadExtension(t *testing.T) { }{ "all good": { setup: func(i *ContractInfo) { - i.SetExtension(&myExtension) + i.SetExtension(&myExtension) //nolint:errcheck }, param: func() ContractInfoExtension { return &govtypes.Proposal{} @@ -245,7 +244,7 @@ func TestContractInfoReadExtension(t *testing.T) { }, "nil argument value": { setup: func(i *ContractInfo) { - i.SetExtension(&myExtension) + i.SetExtension(&myExtension) //nolint:errcheck }, param: func() ContractInfoExtension { return nil @@ -254,7 +253,7 @@ func TestContractInfoReadExtension(t *testing.T) { }, "non matching types": { setup: func(i *ContractInfo) { - i.SetExtension(&myExtension) + i.SetExtension(&myExtension) //nolint:errcheck }, param: func() ContractInfoExtension { return &govtypes.TextProposal{}