From 01c94ac34c1cd4be6183a1b691233cf2998d1675 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 15 Oct 2024 14:27:32 +0200 Subject: [PATCH] feat: integrate with v0.52.x (1/n) (#4289) v052 is getting audited, this is time for us to update modules and simapp to the latest version. This PR focuses on: - [x] Updating Ignite to use latest SDK - [ ] Update module wiring to core v1 (follow-up, made only to pass build, follow up will clean it up and wire environment) - [x] Update simapp to v0.52 - [x] Delete IBC (unsupported for now) --- .gitignore | 1 + changelog.md | 3 +- go.mod | 131 +- go.sum | 452 ++----- ignite/cmd/chain_simulate.go | 60 +- ignite/cmd/scaffold_module.go | 8 +- .../plugin/testdata/execute_fail/go.mod | 45 +- .../plugin/testdata/execute_ok/go.mod | 45 +- ignite/internal/tools/gen-config-doc/go.mod | 5 +- ignite/internal/tools/gen-mig-diffs/go.mod | 5 +- ignite/pkg/chaincmd/chaincmd.go | 5 +- ignite/pkg/chaincmd/runner/simulate.go | 4 - ignite/pkg/chaincmd/simulate.go | 63 +- ignite/pkg/cosmosaccount/cosmosaccount.go | 2 +- ignite/pkg/cosmosanalysis/app/app_test.go | 276 +---- .../pkg/cosmosanalysis/app/testdata/app_di.go | 54 +- .../app/testdata/app_generic.go | 2 +- .../app/testdata/app_minimal.go | 2 +- .../app/testdata/modules/app_config/app.go | 8 +- .../testdata/modules/app_config/app_config.go | 50 +- .../app/testdata/modules/crescent/app.go | 1034 --------------- .../app/testdata/modules/crescent/go.mod | 29 - .../app/testdata/modules/gaia/app.go | 1098 ---------------- .../app/testdata/modules/gaia/go.mod | 28 - .../app/testdata/modules/juno/app.go | 942 -------------- .../app/testdata/modules/juno/go.mod | 33 - .../app/testdata/modules/runtime/app.go | 18 +- .../app/testdata/modules/single_app/app.go | 10 +- .../app/testdata/modules/spn/app.go | 1104 ----------------- .../app/testdata/modules/spn/go.mod | 343 ----- .../cosmosanalysis/app/testdata/two_app.go | 2 +- ignite/pkg/cosmosanalysis/cosmosanalysis.go | 3 +- .../module/testdata/earth/app/app_config.go | 50 +- ignite/pkg/cosmosclient/bank.go | 3 +- ignite/pkg/cosmosclient/bank_test.go | 2 +- ignite/pkg/cosmosclient/consensus.go | 2 +- ignite/pkg/cosmosclient/cosmosclient.go | 32 +- ignite/pkg/cosmosclient/cosmosclient_test.go | 63 +- ignite/pkg/cosmosclient/gasometer.go | 5 +- .../cosmosclient/mocks/account_retriever.go | 18 +- .../cosmosclient/mocks/bank_query_client.go | 56 +- .../pkg/cosmosclient/mocks/faucet_client.go | 6 +- ignite/pkg/cosmosclient/mocks/rpc_client.go | 468 ++++--- ignite/pkg/cosmosclient/mocks/signer.go | 20 +- ignite/pkg/cosmosclient/signer.go | 4 +- ignite/pkg/cosmosclient/testutil/mocks.go | 2 +- ignite/pkg/cosmosclient/txservice.go | 4 +- ignite/pkg/cosmosclient/txservice_test.go | 34 +- ignite/pkg/cosmosgen/generate_openapi.go | 1 + ignite/pkg/cosmosgen/template.go | 2 +- ignite/pkg/cosmostxcollector/mocks/saver.go | 9 +- .../cosmostxcollector/mocks/txs_collector.go | 6 +- ignite/services/chain/lint_test.go | 6 - ignite/services/chain/simulate.go | 10 - ignite/services/plugin/mocks/chainer.go | 22 +- ignite/services/plugin/plugin_test.go | 4 + ignite/services/scaffolder/module.go | 2 + .../app/files-minimal/app/app.go.plush | 143 +-- .../app/files-minimal/app/app_config.go.plush | 171 +-- ignite/templates/app/files/app/app.go.plush | 263 ++-- .../app/files/app/app_config.go.plush | 373 +++--- .../templates/app/files/app/export.go.plush | 93 +- ignite/templates/app/files/app/ibc.go.plush | 206 --- .../app/files/app/sim_bench_test.go.plush | 146 +-- .../templates/app/files/app/sim_test.go.plush | 567 ++++----- .../cmd/commands.go.plush | 75 +- .../{{binaryNamePrefix}}d/cmd/config.go.plush | 1 - .../{{binaryNamePrefix}}d/cmd/root.go.plush | 99 +- .../cmd/testnet.go.plush | 74 +- ignite/templates/app/files/go.mod.plush | 76 +- ignite/templates/ibc/packet.go | 2 +- .../simulation/{{msgName}}.go.plush | 3 +- ignite/templates/message/message.go | 2 +- .../testutil/keeper/{{moduleName}}.go.plush | 5 +- .../x/{{moduleName}}/module/genesis.go.plush | 6 +- .../x/{{moduleName}}/module/module.go.plush | 60 +- .../{{moduleName}}/module/simulation.go.plush | 1 + .../x/{{moduleName}}/types/codec.go.plush | 8 +- .../types/expected_keepers.go.plush | 4 +- .../testutil/keeper/{{moduleName}}.go.plush | 5 +- .../files/testutil/network/network.go.plush | 7 +- .../simulation/{{typeName}}.go.plush | 7 +- ignite/templates/typed/list/list.go | 2 +- .../simulation/{{typeName}}.go.plush | 7 +- ignite/templates/typed/map/map.go | 2 +- ignite/templates/typed/simapp.go | 4 +- .../simulation/{{typeName}}.go.plush | 7 +- ignite/templates/typed/singleton/singleton.go | 2 +- integration/app/cmd_app_test.go | 2 +- .../cosmosgen/cosmosgen_composables_test.go | 1 - integration/cosmosgen/cosmosgen_hooks_test.go | 1 - integration/cosmosgen/cosmosgen_test.go | 1 - integration/faucet/faucet_test.go | 2 +- integration/ibc/cmd_ibc_test.go | 6 +- .../plugin/testdata/example-plugin/go.mod | 43 +- 95 files changed, 1876 insertions(+), 7297 deletions(-) delete mode 100644 ignite/pkg/cosmosanalysis/app/testdata/modules/crescent/app.go delete mode 100644 ignite/pkg/cosmosanalysis/app/testdata/modules/crescent/go.mod delete mode 100644 ignite/pkg/cosmosanalysis/app/testdata/modules/gaia/app.go delete mode 100644 ignite/pkg/cosmosanalysis/app/testdata/modules/gaia/go.mod delete mode 100644 ignite/pkg/cosmosanalysis/app/testdata/modules/juno/app.go delete mode 100644 ignite/pkg/cosmosanalysis/app/testdata/modules/juno/go.mod delete mode 100644 ignite/pkg/cosmosanalysis/app/testdata/modules/spn/app.go delete mode 100644 ignite/pkg/cosmosanalysis/app/testdata/modules/spn/go.mod delete mode 100644 ignite/services/chain/lint_test.go delete mode 100644 ignite/templates/app/files/app/ibc.go.plush diff --git a/.gitignore b/.gitignore index 6bf9befdb1..2afdef14c5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ node_modules docs/.vuepress/dist build/ *coverage.* +*.ign \ No newline at end of file diff --git a/changelog.md b/changelog.md index 5c844cffea..b6a35e7906 100644 --- a/changelog.md +++ b/changelog.md @@ -18,8 +18,9 @@ - [#4131](https://github.com/ignite/cli/pull/4131) Support `bytes` as data type in the `scaffold` commands - [#4300](https://github.com/ignite/cli/pull/4300) Only panics the module in the most top function level - [#4327](https://github.com/ignite/cli/pull/4327) Use the TxConfig from simState instead create a new one -- [#4326](https://github.com/ignite/cli/pull/4326) fAdd `buf.build` version to `ignite version` command +- [#4326](https://github.com/ignite/cli/pull/4326) Add `buf.build` version to `ignite version` command - [#4362](https://github.com/ignite/cli/pull/4362) Scaffold `Makefile` +- [#4289](https://github.com/ignite/cli/pull/4289) Cosmos SDK v0.52 support ### Changes diff --git a/go.mod b/go.mod index 043ad2d31f..6f3f799435 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,18 @@ module github.com/ignite/cli/v29 -go 1.23 +go 1.23.1 + +// Cosmos SDK v0.52 integration +replace ( + cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240911201245-4fe934e8af85 // main + cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.1 // main + cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240911201245-4fe934e8af85 // main + cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20240911202929-e7724c664784 // release/v0.52.x + cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20240911202929-e7724c664784 // release/v0.52.x + cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20240911202929-e7724c664784 // release/v0.52.x + cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20240911202929-e7724c664784 // release/v0.52.x + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.1 +) replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 @@ -13,7 +25,10 @@ replace ( ) require ( + cosmossdk.io/core v1.0.0 cosmossdk.io/math v1.3.0 + cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 + cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 github.com/99designs/keyring v1.2.2 github.com/AlecAivazis/survey/v2 v2.3.7 github.com/DATA-DOG/go-sqlmock v1.5.2 @@ -27,13 +42,14 @@ require ( github.com/charmbracelet/glow v1.4.1 github.com/charmbracelet/lipgloss v0.6.0 github.com/cockroachdb/errors v1.11.3 - github.com/cometbft/cometbft v0.38.12 - github.com/cosmos/cosmos-sdk v0.50.9 + github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f + github.com/cometbft/cometbft/api v1.0.0-rc.1 + github.com/cosmos/cosmos-sdk v0.52.0 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.7.0 github.com/emicklei/proto v1.12.2 github.com/emicklei/proto-contrib v0.15.0 - github.com/getsentry/sentry-go v0.27.0 + github.com/getsentry/sentry-go v0.28.1 github.com/go-delve/delve v1.21.0 github.com/go-git/go-git/v5 v5.12.0 github.com/go-openapi/analysis v0.23.0 @@ -49,10 +65,10 @@ require ( github.com/google/go-querystring v1.1.0 github.com/gorilla/mux v1.8.1 github.com/hashicorp/go-hclog v1.6.3 - github.com/hashicorp/go-plugin v1.6.0 + github.com/hashicorp/go-plugin v1.6.1 github.com/iancoleman/strcase v0.3.0 github.com/ignite/web v0.6.1 - github.com/imdario/mergo v0.3.13 + github.com/imdario/mergo v0.3.15 github.com/lib/pq v1.10.9 github.com/manifoldco/promptui v0.9.0 github.com/mitchellh/mapstructure v1.5.0 @@ -68,15 +84,15 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 github.com/tbruyelle/mdgofmt v0.1.3 - github.com/vektra/mockery/v2 v2.40.1 - go.etcd.io/bbolt v1.3.10 - golang.org/x/mod v0.20.0 + github.com/vektra/mockery/v2 v2.46.0 + go.etcd.io/bbolt v1.4.0-alpha.1 + golang.org/x/mod v0.21.0 golang.org/x/sync v0.8.0 - golang.org/x/term v0.23.0 - golang.org/x/text v0.17.0 - golang.org/x/tools v0.24.0 + golang.org/x/term v0.24.0 + golang.org/x/text v0.18.0 + golang.org/x/tools v0.25.0 golang.org/x/vuln v1.0.4 - google.golang.org/grpc v1.64.1 + google.golang.org/grpc v1.66.1 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v3 v3.0.1 mvdan.cc/gofumpt v0.7.0 @@ -89,18 +105,20 @@ require ( buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240508200655-46a4cf4ba109.1 // indirect buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.1-20240514010100-299bd9c9a0c4.1 // indirect buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.1-20240514010100-299bd9c9a0c4.1 // indirect + buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect + buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect connectrpc.com/connect v1.16.1 // indirect connectrpc.com/otelconnect v0.7.0 // indirect - cosmossdk.io/api v0.7.5 // indirect - cosmossdk.io/collections v0.4.0 // indirect - cosmossdk.io/core v0.11.1 // indirect + cosmossdk.io/api v0.8.0 // indirect + cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab // indirect cosmossdk.io/depinject v1.0.0 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/log v1.4.1 // indirect - cosmossdk.io/store v1.1.1 // indirect - cosmossdk.io/x/tx v0.13.4 // indirect + cosmossdk.io/schema v0.2.0 // indirect + cosmossdk.io/store v1.1.1-0.20240909133312-50288938d1b6 // indirect + cosmossdk.io/x/tx v0.13.4-0.20240909133312-50288938d1b6 // indirect dario.cat/mergo v1.0.0 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/4meepo/tagalign v1.3.4 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/Abirdcfly/dupword v0.0.14 // indirect @@ -110,13 +128,12 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/Crocmagnon/fatcontext v0.4.0 // indirect - github.com/DataDog/datadog-go v3.2.0+incompatible // indirect - github.com/DataDog/zstd v1.5.5 // indirect + github.com/DataDog/datadog-go v4.8.3+incompatible // indirect + github.com/DataDog/zstd v1.5.6 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect github.com/Masterminds/semver/v3 v3.3.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/OneOfOne/xxhash v1.2.8 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/alecthomas/chroma v0.8.2 // indirect @@ -129,10 +146,10 @@ require ( github.com/ashanbrown/forbidigo v1.6.0 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect github.com/atotto/clipboard v0.1.2 // indirect - github.com/aymanbagabas/go-osc52 v1.2.1 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/bgentry/speakeasy v0.2.0 // indirect github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect github.com/bombsimon/wsl/v4 v4.4.1 // indirect @@ -149,8 +166,6 @@ require ( github.com/calmh/randomart v1.1.0 // indirect github.com/catenacyber/perfsprint v0.7.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.2 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect github.com/charmbracelet/charm v0.8.6 // indirect @@ -161,22 +176,23 @@ require ( github.com/cilium/ebpf v0.11.0 // indirect github.com/ckaznocha/intrange v0.1.2 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect + github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/pebble v1.1.2 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft-db v0.11.0 // indirect + github.com/cometbft/cometbft-db v0.15.0 // indirect github.com/containerd/console v1.0.4-0.20230508195404-8d3c090fd31c // indirect github.com/containerd/containerd v1.7.11 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect github.com/cosiner/argv v0.1.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.2 // indirect + github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/cosmos/crypto v0.1.2 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.2.0 // indirect + github.com/cosmos/iavl v1.3.0 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect @@ -186,14 +202,12 @@ require ( github.com/danieljoos/wincred v1.2.1 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d // indirect - github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect - github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.1.1 // indirect + github.com/dgraph-io/badger/v4 v4.3.0 // indirect + github.com/dgraph-io/ristretto v0.1.2-0.20240116140435-c67e07994f91 // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect - github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/dlclark/regexp2 v1.2.0 // indirect github.com/docker/cli v26.1.2+incompatible // indirect @@ -204,7 +218,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect - github.com/emicklei/dot v1.6.1 // indirect + github.com/emicklei/dot v1.6.2 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/color v1.17.0 // indirect @@ -221,7 +235,7 @@ require ( github.com/go-delve/liner v1.2.3-0.20231231155935-4726ab1d7f62 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -253,7 +267,6 @@ require ( github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.1.0 // indirect - github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -264,8 +277,9 @@ require ( github.com/golangci/plugin-module-register v0.1.1 // indirect github.com/golangci/revgrep v0.5.3 // indirect github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/cel-go v0.20.1 // indirect + github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-containerregistry v0.19.1 // indirect github.com/google/go-dap v0.11.0 // indirect @@ -289,11 +303,10 @@ require ( github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/hdevalence/ed25519consensus v0.2.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/huandu/xstrings v1.4.0 // indirect - github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jdx/go-netrc v1.0.0 // indirect @@ -321,7 +334,7 @@ require ( github.com/ldez/gomoddirectives v0.2.4 // indirect github.com/ldez/tagliatelle v0.5.0 // indirect github.com/leonklingele/grouper v1.1.2 // indirect - github.com/linxGnu/grocksdb v1.8.14 // indirect + github.com/linxGnu/grocksdb v1.9.3 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/lufeee/execinquery v1.2.1 // indirect github.com/macabu/inamedparam v0.1.3 // indirect @@ -333,7 +346,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/meowgorithm/babyenv v1.3.1 // indirect github.com/mgechev/revive v1.3.9 // indirect github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect @@ -354,7 +367,7 @@ require ( github.com/muesli/gitcha v0.2.0 // indirect github.com/muesli/go-app-paths v0.2.1 // indirect github.com/muesli/sasquatch v0.0.0-20200811221207-66979d92330a // indirect - github.com/muesli/termenv v0.14.0 // indirect + github.com/muesli/termenv v0.15.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nakabonne/nestif v0.3.1 // indirect github.com/nishanths/exhaustive v0.12.0 // indirect @@ -367,17 +380,17 @@ require ( github.com/onsi/ginkgo v1.16.4 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.2.2 // indirect - github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect + github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polyfloyd/go-errorlint v1.6.0 // indirect - github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_golang v1.20.3 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.59.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/quasilyte/go-ruleguard v0.4.2 // indirect github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect @@ -396,7 +409,7 @@ require ( github.com/sahilm/fuzzy v0.1.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sasha-s/go-deadlock v0.3.5 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0 // indirect @@ -413,13 +426,14 @@ require ( github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/cast v1.7.0 // indirect github.com/spf13/viper v1.19.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/supranational/blst v0.3.13 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tendermint/go-amino v0.16.0 // indirect @@ -429,7 +443,6 @@ require ( github.com/timonwong/loggercheck v0.9.4 // indirect github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect - github.com/ugorji/go/codec v1.2.11 // indirect github.com/ultraware/funlen v0.1.0 // indirect github.com/ultraware/whitespace v0.1.1 // indirect github.com/uudashr/gocognit v1.1.3 // indirect @@ -444,9 +457,12 @@ require ( github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect gitlab.com/bosi/decorder v0.4.2 // indirect + gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect + gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go-simpler.org/musttag v0.12.2 // indirect go-simpler.org/sloglint v0.7.2 // indirect go.mongodb.org/mongo-driver v1.14.0 // indirect + go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect go.opentelemetry.io/otel v1.26.0 // indirect go.opentelemetry.io/otel/metric v1.26.0 // indirect @@ -458,21 +474,20 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.6.0 // indirect - golang.org/x/crypto v0.26.0 // indirect - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.24.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.25.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gotest.tools/v3 v3.5.1 // indirect honnef.co/go/tools v0.5.1 // indirect mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect - nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect ) diff --git a/go.sum b/go.sum index f71c75b9d3..f94be37fc8 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,10 @@ buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.1-20240514010100-299bd9c9 buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.1-20240514010100-299bd9c9a0c4.1/go.mod h1:3Vwq3HRCNOcnv99Ra+/8K5cntwO/Gw98cIjsjQVxf4E= buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.1-20240514010100-299bd9c9a0c4.1 h1:zrXXp1IT3qukIKorguvnrw/JzxYttBrXzktUQGiQHqA= buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.1-20240514010100-299bd9c9a0c4.1/go.mod h1:8ONhsyCTLQ9kBslWnMgPrXTcxzCkKlxZqN9ewUveui8= +buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 h1:90/4O5QkHb8EZdA2SAhueRzYw6u5ZHCPKtReFqshnTY= +buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2/go.mod h1:1+3gJj2NvZ1mTLAtHu+lMhOjGgQPiCKCeo+9MBww0Eo= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 h1:b7EEYTUHmWSBEyISHlHvXbJPqtKiHRuUignL1tsHnNQ= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2/go.mod h1:HqcXMSa5qnNuakaMUo+hWhF51mKbcrZxGl9Vp5EeJXc= 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= @@ -25,12 +29,14 @@ connectrpc.com/connect v1.16.1 h1:rOdrK/RTI/7TVnn3JsVxt3n028MlTRwmK5Q4heSpjis= connectrpc.com/connect v1.16.1/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY= connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc= -cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= -cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= -cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= -cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= -cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= -cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= +cosmossdk.io/api v0.7.3-0.20240911201245-4fe934e8af85 h1:M01O4ZalrgnK2L69qszqQgQbeZcka6zCxiBpGdB8NUw= +cosmossdk.io/api v0.7.3-0.20240911201245-4fe934e8af85/go.mod h1:QAFDTJvMz5Y2JkMFHWKmSp6yFS6A0TSn9izzNAhBFBI= +cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab h1:E/IWad76v1Nc4Atswaccpt7twJ0VwHkbY94/PhmZfTo= +cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab/go.mod h1:Or+5eVAo1aiS1DnPK90eQykGc59LGBWtqwBoJcxXTmw= +cosmossdk.io/core v1.0.0-alpha.1 h1:iElkDJhxmy51aLMSLMZcfsqcv4QG4/1UHbHiW8Llw6k= +cosmossdk.io/core v1.0.0-alpha.1/go.mod h1:abgLjeFLhtuKIYZWSPlVUgQBrKObO7ULV35KYfexE90= +cosmossdk.io/core/testing v0.0.0-20240909133312-50288938d1b6 h1:YhfTsHmKavtdPWMnFOv2+Ivt3+oHSg5fl4JXh8+dL6c= +cosmossdk.io/core/testing v0.0.0-20240909133312-50288938d1b6/go.mod h1:3E/YFMOXeNANtS5X3iZS3j1dmIpN+EVRw2vb9S8grCw= cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050= cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -39,15 +45,21 @@ cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= -cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= -cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= -cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= -cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= +cosmossdk.io/schema v0.2.0 h1:UH5CR1DqUq8yP+5Np8PbvG4YX0zAUsTN2Qk6yThmfMk= +cosmossdk.io/schema v0.2.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/store v1.0.0-rc.0.0.20240911201245-4fe934e8af85 h1:ydaTLsL/qU3bd4eE7o4QIavf8n4LDJ4d/7qfZgXezjY= +cosmossdk.io/store v1.0.0-rc.0.0.20240911201245-4fe934e8af85/go.mod h1:oGmtOScutqPixsgoFIzNLplsaO5dq8VF4kZd1l98nJ8= +cosmossdk.io/x/bank v0.0.0-20240911202929-e7724c664784 h1:H8UAL4w8H/QJZ1fj9t3/ebpVfK5mSDb6BeULKLmOu7E= +cosmossdk.io/x/bank v0.0.0-20240911202929-e7724c664784/go.mod h1:oo1rdse7UcGHCW6BNZJMj4LhkkLS3yXTJ7l7avs86Hw= +cosmossdk.io/x/staking v0.0.0-20240911202929-e7724c664784 h1:yAhdJ2dQyJtpFzfud4TgbmS5snSruqMWal3mE83ADcw= +cosmossdk.io/x/staking v0.0.0-20240911202929-e7724c664784/go.mod h1:AMBXP+pz9KsBueAP6Ks63DHHbo/XCuxt/JFBoleUBM8= +cosmossdk.io/x/tx v0.13.4-0.20240909133312-50288938d1b6 h1:iOy4n9nKBKaLpPMLaxpzzfHbJKxFgpHc17noeK4dHec= +cosmossdk.io/x/tx v0.13.4-0.20240909133312-50288938d1b6/go.mod h1:D4mjFUYiNi1/r0p1kknsWhUnXxK9Y8RV1GQUdHEaBRw= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8= github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= @@ -74,15 +86,15 @@ github.com/Crocmagnon/fatcontext v0.4.0 h1:4ykozu23YHA0JB6+thiuEv7iT6xq995qS1vcu github.com/Crocmagnon/fatcontext v0.4.0/go.mod h1:ZtWrXkgyfsYPzS6K3O88va6t2GEglG93vnII/F94WC0= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= -github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= -github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= +github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY= +github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 h1:/fTUt5vmbkAcMBt4YQiuC23cV0kEsN1MVMNqeOW43cU= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0/go.mod h1:ONJg5sxcbsdQQ4pOW8TGdTidT2TMAUy/2Xhr8mrYaao= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= @@ -93,17 +105,12 @@ github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYx github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= -github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= -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/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/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= @@ -122,7 +129,6 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy 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/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= @@ -134,15 +140,12 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuW github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= @@ -151,11 +154,9 @@ github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5Fc github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/atotto/clipboard v0.1.2 h1:YZCtFu5Ie8qX2VmVTBnrqLSiU9XOWwqNRmdT3gIQzbY= github.com/atotto/clipboard v0.1.2/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymanbagabas/go-osc52 v1.2.1 h1:q2sWUyDcozPLcLabEMd+a+7Ea2DitxZVN9hTxab9L4E= github.com/aymanbagabas/go-osc52 v1.2.1/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -164,10 +165,8 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce 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/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= -github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= +github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= @@ -208,18 +207,15 @@ github.com/butuzov/mirror v1.2.0/go.mod h1:DqZZDtzm42wIAIyHXeN8W/qb1EPlb9Qn/if9i github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/calmh/randomart v1.1.0 h1:evl+iwc10LXtHdMZhzLxmsCQVmWnkXs44SbC6Uk0Il8= github.com/calmh/randomart v1.1.0/go.mod h1:DQUbPVyP+7PAs21w/AnfMKG5NioxS3TbZ2F9MSK/jFM= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= github.com/catenacyber/perfsprint v0.7.1/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= 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.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -265,7 +261,6 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/ckaznocha/intrange v0.1.2 h1:3Y4JAxcMntgb/wABQ6e8Q8leMd26JbX2790lIss9MTI= github.com/ckaznocha/intrange v0.1.2/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= @@ -277,26 +272,26 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH 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/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 h1:pU88SPhIFid6/k0egdR5V6eALQYq2qbSmukrkgIh/0A= +github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= -github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= -github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= -github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= -github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= +github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f h1:rPWKqyc+CeuddICqlqptf+3NPE8exbC9SOGuDPTEN3k= +github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f/go.mod h1:MqZ5E5jLU1JdP10FSRXhItpm+GdHMbW7Myv3UARLxqg= +github.com/cometbft/cometbft-db v0.15.0 h1:VLtsRt8udD4jHCyjvrsTBpgz83qne5hnL245AcPJVRk= +github.com/cometbft/cometbft-db v0.15.0/go.mod h1:EBrFs1GDRiTqrWXYi4v90Awf/gcdD5ExzdPbg4X8+mk= +github.com/cometbft/cometbft/api v1.0.0-rc.1 h1:GtdXwDGlqwHYs16A4egjwylfYOMYyEacLBrs3Zvpt7g= +github.com/cometbft/cometbft/api v1.0.0-rc.1/go.mod h1:NDFKiBBD8HJC6QQLAoUI99YhsiRZtg2+FJWfk6A6m6o= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/console v1.0.4-0.20230508195404-8d3c090fd31c h1:sgmd9/Gm5SFfxHSVVD7HAaEQlaUJKdJ2VlQM8SwUxvs= @@ -310,24 +305,23 @@ github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9N github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosiner/argv v0.1.0 h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg= github.com/cosiner/argv v0.1.0/go.mod h1:EusR6TucWKX+zFgtdUsKT2Cvg45K5rtpCcWz4hK06d8= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= -github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22 h1:V3WlarcZwlYYt3dUsStxm0FAFXVeEcvgwfmR6upxm5M= +github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.50.9 h1:gt2usjz0H0qW6KwAxWw7ZJ3XU8uDwmhN+hYG3nTLeSg= -github.com/cosmos/cosmos-sdk v0.50.9/go.mod h1:TMH6wpoYBcg7Cp5BEg8fneLr+8XloNQkf2MRNF9V6JE= +github.com/cosmos/cosmos-sdk v0.52.0-beta.1 h1:1D6EI2jB+Kqt6rX5YKL/B2EGJ7rifd9qy5x4MtM6PC4= +github.com/cosmos/cosmos-sdk v0.52.0-beta.1/go.mod h1:N0SzGvdpqAhhg9lXCMbrxAwfCSyg3LJM312xj5l00j0= +github.com/cosmos/crypto v0.1.2 h1:Yn500sPY+9sKVdhiPUSDtt8JOpBGMB515dOmla4zfls= +github.com/cosmos/crypto v0.1.2/go.mod h1:b6VWz3HczIpBaQPvI7KrbQeF3pXHh0al3T5e0uwMBQw= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -335,20 +329,17 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= -github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= -github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= +github.com/cosmos/iavl v1.3.0 h1:Ezaxt8aPA3kbkhsfyqwenChGLQwHDAIif3tG9x1FMV8= +github.com/cosmos/iavl v1.3.0/go.mod h1:T6SfBcyhulVIY2G/ZtAtQm/QiJvsuhIos52V4dWYk88= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= @@ -369,21 +360,17 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= github.com/derekparker/trie v0.0.0-20221213183930-4c74548207f4/go.mod h1:C7Es+DLenIpPc9J6IYw4jrK0h7S9bKj4DNl8+KxGEXU= github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d h1:hUWoLdw5kvo2xCsqlsIBMvWUc1QCSsCYD2J2+Fg6YoU= github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d/go.mod h1:C7Es+DLenIpPc9J6IYw4jrK0h7S9bKj4DNl8+KxGEXU= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= -github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= -github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgraph-io/badger/v4 v4.3.0 h1:lcsCE1/1qrRhqP+zYx6xDZb8n7U+QlwNicpc676Ub40= +github.com/dgraph-io/badger/v4 v4.3.0/go.mod h1:Sc0T595g8zqAQRDf44n+z3wG4BOqLwceaFntt8KPxUM= +github.com/dgraph-io/ristretto v0.1.2-0.20240116140435-c67e07994f91 h1:Pux6+xANi0I7RRo5E1gflI4EZ2yx3BGZ75JkAIvGEOA= +github.com/dgraph-io/ristretto v0.1.2-0.20240116140435-c67e07994f91/go.mod h1:swkazRqnUf1N62d0Nutz7KIj2UKqsm/H8tD0nBJAXqM= 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= @@ -403,28 +390,21 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= -github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= -github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= +github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/emicklei/proto v1.12.2 h1:ZDyDzrfMt7ncmyor/j07uoOCGLKtU5F87vTPwIzLe/o= github.com/emicklei/proto v1.12.2/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= github.com/emicklei/proto-contrib v0.15.0 h1:5D8JKpV1qekMDFwEJp8NVJGY1We6t14dn9D4G05fpyo= github.com/emicklei/proto-contrib v0.15.0/go.mod h1:p6zmoy14hFYiwUb35X7nJ4u4l1vfvjc1mWrIt8QB3kw= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -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= @@ -453,8 +433,6 @@ github.com/firefart/nonamedreturns v1.0.5 h1:tM+Me2ZaXs8tfdDw3X6DOX++wMCOqzYUho6 github.com/firefart/nonamedreturns v1.0.5/go.mod h1:gHJjDqhGM4WyPt639SOZs+G89Ko7QKH5R5BhnO6xJhw= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= @@ -464,15 +442,11 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= -github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= +github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghostiam/protogetter v0.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk= github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= -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/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE= github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s= @@ -495,12 +469,10 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= 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-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= @@ -530,19 +502,14 @@ github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMg github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -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/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -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-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -593,14 +560,8 @@ github.com/gobuffalo/validate/v3 v3.3.3 h1:o7wkIGSvZBYBd6ChQoLxkz2y1pfmhbI4jNJYh github.com/gobuffalo/validate/v3 v3.3.3/go.mod h1:YC7FsbJ/9hW/VjQdmXPvFqvRis4vrRYFxr69WiNZw6g= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/gobwas/ws v1.2.1 h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk= github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= github.com/goccy/go-yaml v1.11.3 h1:B3W9IdWbvrUu2OYQGwvU1nZtvMQJPBKgBUuweJjLj6I= github.com/goccy/go-yaml v1.11.3/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= @@ -614,12 +575,10 @@ github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1 github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM= github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -629,11 +588,8 @@ github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-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= @@ -646,7 +602,6 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -659,8 +614,6 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= @@ -681,10 +634,12 @@ github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNF github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= +github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= +github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786 h1:rcv+Ippz6RAtvaGgKxc+8FQIpxHgsF+HBzPyYL2cyVU= github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786/go.mod h1:apVn/GCasLZUVpAJ6oWAuyP7Ne7CEsQbTnc0plM3m+o= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -694,6 +649,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.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= @@ -726,7 +682,6 @@ github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQu github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= 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.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -736,18 +691,13 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -764,13 +714,10 @@ github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= @@ -778,9 +725,7 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9K github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -793,8 +738,8 @@ github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYS github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= -github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= +github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= 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-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -803,7 +748,6 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -823,8 +767,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= -github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= +github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= @@ -836,7 +780,6 @@ github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= @@ -844,22 +787,19 @@ github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1: github.com/ignite/web v0.6.1 h1:kHG+T7NnR8cCPjAGxEFQD+njVYM08toeG57iYRXzpwo= github.com/ignite/web v0.6.1/go.mod h1:WZWBaBYF8RazN7dE462BLpvXDY8ScacxcJ07BKwX/jY= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -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/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk= github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.16.0 h1:54fZg+49widqXYQ0b+usAFHbMkBGR4PpXrsHc8+TBDg= -github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8= +github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= +github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= @@ -868,24 +808,16 @@ github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9B github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jjti/go-spancheck v0.6.2 h1:iYtoxqPMzHUPp7St+5yA8+cONdyXD3ug6KK15n7Pklk= github.com/jjti/go-spancheck v0.6.2/go.mod h1:+X7lvIrR5ZdUTkxFYqzJ0abr8Sb5LOo80uOhWNqIrYA= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= 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= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -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/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/karamaru-alpha/copyloopvar v1.1.0 h1:x7gNyKcC2vRBO1H2Mks5u1VxQtYvFiym7fCjIP8RPos= @@ -903,9 +835,6 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE= github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= -github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= @@ -936,23 +865,19 @@ github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWW github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= 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/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= -github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= +github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9ik= +github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk= github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -979,7 +904,6 @@ github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb 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-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -990,15 +914,15 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= -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.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/meowgorithm/babyenv v1.3.0/go.mod h1:lwNX+J6AGBFqNrMZ2PTLkM6SO+W4X8DOg9zBDO4j3Ig= github.com/meowgorithm/babyenv v1.3.1 h1:18ZEYIgbzoFQfRLF9+lxjRfk/ui6w8U0FWl07CgWvvc= @@ -1015,8 +939,8 @@ github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgS github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a h1:eU8j/ClY2Ty3qdHnn0TyW3ivFoPC/0F1gQZz8yTxbbE= github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a/go.mod h1:v8eSC2SMp9/7FTKUncp7fH9IwPfw+ysMObcEz5FWheQ= -github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= +github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -1043,12 +967,9 @@ github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4 github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -1074,23 +995,14 @@ github.com/muesli/termenv v0.7.2/go.mod h1:ct2L5N2lmix82RaY3bMWwVu/jUFc9Ule0KGDC github.com/muesli/termenv v0.7.4/go.mod h1:pZ7qY9l3F7e5xsAOS0zCew2tME+p7bWeBkotCEcIIcc= github.com/muesli/termenv v0.8.1/go.mod h1:kzt/D/4a88RoheZmwfqorY3A+tnsSMA9HJC/fQSFKo0= github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= -github.com/muesli/termenv v0.14.0 h1:8x9NFfOe8lmIWK4pgy3IfVEy47f+ppe3tUqdPZG2Uy0= github.com/muesli/termenv v0.14.0/go.mod h1:kG/pF1E7fh949Xhe156crRUrHNyK221IuGO7Ez60Uc8= +github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= +github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= @@ -1101,45 +1013,33 @@ github.com/nqd/flat v0.2.0/go.mod h1:FOuslZmNY082wVfVUUb7qAGWKl8z8Nor9FMg+Xj2Nss github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= 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.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= 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.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= @@ -1150,22 +1050,16 @@ github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT9 github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= -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 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.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= -github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= -github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/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/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= @@ -1177,7 +1071,6 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1189,39 +1082,27 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= -github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.3 h1:oPksm4K8B+Vt35tUhw6GbSNSgVlVSBH0qELP/7u83l4= +github.com/prometheus/client_golang v1.20.3/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= +github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -1237,7 +1118,6 @@ github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4l github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE= github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -1249,13 +1129,11 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1272,13 +1150,12 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI= github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= -github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= -github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= +github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.27.0 h1:t/3jZpSXtRPRf2xr0m63i32ZrusyurIGT9E5wAvXQnI= @@ -1316,7 +1193,6 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9 github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= @@ -1326,26 +1202,20 @@ github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag07 github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= @@ -1357,9 +1227,6 @@ github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -1382,6 +1249,8 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8 github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk= +github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= 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/tbruyelle/mdgofmt v0.1.3 h1:ZQo2nbYhK7CG0kApQmgUeMBFugIgIO9tHvyChaMzf30= @@ -1402,7 +1271,6 @@ github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+n github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tomarrell/wrapcheck/v2 v2.9.0 h1:801U2YCAjLhdN8zhZ/7tdjB3EnAoRlJHt/s+9hijLQ4= github.com/tomarrell/wrapcheck/v2 v2.9.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= @@ -1410,23 +1278,16 @@ github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+ github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/Gk8VQ= github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/uudashr/gocognit v1.1.3 h1:l+a111VcDbKfynh+airAy/DJQKaXh2m9vkoysMPSZyM= github.com/uudashr/gocognit v1.1.3/go.mod h1:aKH8/e8xbTRBwjbCkwZ8qt4l2EpKXl31KMHgSS+lZ2U= github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= -github.com/vektra/mockery/v2 v2.40.1 h1:8D01rBqloDLDHKZGXkyUD9Yj5Z+oDXBqDZ+tRXYM/oA= -github.com/vektra/mockery/v2 v2.40.1/go.mod h1:dPzGtjT0/Uu4hqpF6QNHwz+GLago7lq1bxdj9wHbGKo= +github.com/vektra/mockery/v2 v2.46.0 h1:DKIFj6hAPGwmOYiWfWzdsQtBgU8ozPXo3Bwbmf+Ku80= +github.com/vektra/mockery/v2 v2.46.0/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= @@ -1456,6 +1317,10 @@ github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfU github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= +gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA= +gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8= +gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q= +gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I= go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs= @@ -1463,17 +1328,14 @@ go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= -go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/bbolt v1.4.0-alpha.1 h1:3yrqQzbRRPFPdOMWS/QQIVxVnzSkAZQYeWlZFv1kbj4= +go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= @@ -1496,9 +1358,7 @@ go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naR go.starlark.net v0.0.0-20220816155156-cfacd8902214/go.mod h1:VZcBMdr3cT3PnBoWunTabuSEXwVAH+ZJ5zxfs3AdASk= go.starlark.net v0.0.0-20231101134539-556fd59b42f6 h1:+eC0F/k4aBLC4szgOcjd7bDTEnpxADJyWJE0yowgM3E= go.starlark.net v0.0.0-20231101134539-556fd59b42f6/go.mod h1:LcLNIzVOMp4oV+uusnpk+VU+SzXaJakUuBjoCSWH5dM= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= @@ -1508,13 +1368,10 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= @@ -1523,11 +1380,9 @@ golang.org/x/arch v0.6.0 h1:S0JTfE48HbRj80+4tbvZDYsJ3tGv6BUU3XxyZ7CirAc= golang.org/x/arch v0.6.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1539,16 +1394,15 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 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-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= @@ -1566,8 +1420,6 @@ golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 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.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.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -1578,8 +1430,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1588,7 +1440,6 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1598,17 +1449,15 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/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-20201021035429-f5854403a974/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-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -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-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1621,8 +1470,8 @@ golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= 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= @@ -1650,7 +1499,6 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1660,25 +1508,16 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1695,7 +1534,6 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc 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-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1714,7 +1552,6 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc 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.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1722,8 +1559,8 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1734,8 +1571,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -1747,16 +1584,13 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/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-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1776,13 +1610,9 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1803,8 +1633,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= +golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/vuln v1.0.4 h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I= golang.org/x/vuln v1.0.4/go.mod h1:NbJdUQhX8jY++FtuhrXs2Eyx0yePo9pF7nPlIjo9aaQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1813,14 +1643,12 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 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= @@ -1830,7 +1658,6 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1838,34 +1665,28 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d h1:kHjw/5UfflP/L5EbledDrcG4C2597RtymmGRZvHiCuY= google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d/go.mod h1:mw8MG/Qz5wfgYr6VqVCiZcHe/GJEfI+oGGDCohaVgB0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/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.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -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.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM= +google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= 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= @@ -1874,7 +1695,6 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= 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= @@ -1890,10 +1710,8 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1914,12 +1732,10 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -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= @@ -1931,13 +1747,9 @@ mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU= mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= -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 v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/ignite/cmd/chain_simulate.go b/ignite/cmd/chain_simulate.go index 3bafd43fc1..253ffc79ed 100644 --- a/ignite/cmd/chain_simulate.go +++ b/ignite/cmd/chain_simulate.go @@ -11,22 +11,19 @@ import ( ) const ( - flagSimappGenesis = "genesis" - flagSimappParams = "params" - flagSimappExportParamsPath = "exportParamsPath" - flagSimappExportParamsHeight = "exportParamsHeight" - flagSimappExportStatePath = "exportStatePath" - flagSimappExportStatsPath = "exportStatsPath" - flagSimappSeed = "seed" - flagSimappInitialBlockHeight = "initialBlockHeight" - flagSimappNumBlocks = "numBlocks" - flagSimappBlockSize = "blockSize" - flagSimappLean = "lean" - flagSimappSimulateEveryOperation = "simulateEveryOperation" - flagSimappPrintAllInvariants = "printAllInvariants" - flagSimappVerbose = "verbose" - flagSimappPeriod = "period" - flagSimappGenesisTime = "genesisTime" + flagSimappGenesis = "genesis" + flagSimappParams = "params" + flagSimappExportParamsPath = "exportParamsPath" + flagSimappExportParamsHeight = "exportParamsHeight" + flagSimappExportStatePath = "exportStatePath" + flagSimappExportStatsPath = "exportStatsPath" + flagSimappSeed = "seed" + flagSimappInitialBlockHeight = "initialBlockHeight" + flagSimappNumBlocks = "numBlocks" + flagSimappBlockSize = "blockSize" + flagSimappLean = "lean" + flagSimappPeriod = "period" + flagSimappGenesisTime = "genesisTime" ) // NewChainSimulate creates a new simulation command to run the blockchain simulation. @@ -44,7 +41,6 @@ func NewChainSimulate() *cobra.Command { func chainSimulationHandler(cmd *cobra.Command, _ []string) error { var ( - verbose, _ = cmd.Flags().GetBool(flagSimappVerbose) period, _ = cmd.Flags().GetUint(flagSimappPeriod) genesisTime, _ = cmd.Flags().GetInt64(flagSimappGenesisTime) config = newConfigFromFlags(cmd) @@ -66,7 +62,6 @@ func chainSimulationHandler(cmd *cobra.Command, _ []string) error { } return c.Simulate(cmd.Context(), - chain.SimappWithVerbose(verbose), chain.SimappWithPeriod(period), chain.SimappWithGenesisTime(genesisTime), chain.SimappWithConfig(config), @@ -76,19 +71,17 @@ func chainSimulationHandler(cmd *cobra.Command, _ []string) error { // newConfigFromFlags creates a simulation from the retrieved values of the flags. func newConfigFromFlags(cmd *cobra.Command) simulation.Config { var ( - genesis, _ = cmd.Flags().GetString(flagSimappGenesis) - params, _ = cmd.Flags().GetString(flagSimappParams) - exportParamsPath, _ = cmd.Flags().GetString(flagSimappExportParamsPath) - exportParamsHeight, _ = cmd.Flags().GetInt(flagSimappExportParamsHeight) - exportStatePath, _ = cmd.Flags().GetString(flagSimappExportStatePath) - exportStatsPath, _ = cmd.Flags().GetString(flagSimappExportStatsPath) - seed, _ = cmd.Flags().GetInt64(flagSimappSeed) - initialBlockHeight, _ = cmd.Flags().GetInt(flagSimappInitialBlockHeight) - numBlocks, _ = cmd.Flags().GetInt(flagSimappNumBlocks) - blockSize, _ = cmd.Flags().GetInt(flagSimappBlockSize) - lean, _ = cmd.Flags().GetBool(flagSimappLean) - simulateEveryOperation, _ = cmd.Flags().GetBool(flagSimappSimulateEveryOperation) - printAllInvariants, _ = cmd.Flags().GetBool(flagSimappPrintAllInvariants) + genesis, _ = cmd.Flags().GetString(flagSimappGenesis) + params, _ = cmd.Flags().GetString(flagSimappParams) + exportParamsPath, _ = cmd.Flags().GetString(flagSimappExportParamsPath) + exportParamsHeight, _ = cmd.Flags().GetInt(flagSimappExportParamsHeight) + exportStatePath, _ = cmd.Flags().GetString(flagSimappExportStatePath) + exportStatsPath, _ = cmd.Flags().GetString(flagSimappExportStatsPath) + seed, _ = cmd.Flags().GetInt64(flagSimappSeed) + initialBlockHeight, _ = cmd.Flags().GetInt(flagSimappInitialBlockHeight) + numBlocks, _ = cmd.Flags().GetInt(flagSimappNumBlocks) + blockSize, _ = cmd.Flags().GetInt(flagSimappBlockSize) + lean, _ = cmd.Flags().GetBool(flagSimappLean) ) return simulation.Config{ Commit: true, @@ -103,8 +96,6 @@ func newConfigFromFlags(cmd *cobra.Command) simulation.Config { NumBlocks: numBlocks, BlockSize: blockSize, Lean: lean, - OnOperation: simulateEveryOperation, - AllInvariants: printAllInvariants, } } @@ -121,11 +112,8 @@ func simappFlags(c *cobra.Command) { c.Flags().Int(flagSimappNumBlocks, 200, "number of new blocks to simulate from the initial block height") c.Flags().Int(flagSimappBlockSize, 30, "operations per block") c.Flags().Bool(flagSimappLean, false, "lean simulation log output") - c.Flags().Bool(flagSimappSimulateEveryOperation, false, "run slow invariants every operation") - c.Flags().Bool(flagSimappPrintAllInvariants, false, "print all invariants if a broken invariant is found") // simulation flags - c.Flags().BoolP(flagSimappVerbose, "v", false, "verbose log output") c.Flags().Uint(flagSimappPeriod, 0, "run slow invariants only once every period assertions") c.Flags().Int64(flagSimappGenesisTime, 0, "override genesis UNIX time instead of using a random UNIX time") } diff --git a/ignite/cmd/scaffold_module.go b/ignite/cmd/scaffold_module.go index 98a1576a8f..731b209972 100644 --- a/ignite/cmd/scaffold_module.go +++ b/ignite/cmd/scaffold_module.go @@ -16,9 +16,7 @@ import ( ) // moduleNameKeeperAlias is a map of well known module names that have a different keeper name than the usual Keeper. -var moduleNameKeeperAlias = map[string]string{ - "auth": "account", // TODO(@julienrbrt) remove this when x/accounts is released -} +var moduleNameKeeperAlias = map[string]string{} const ( flagDep = "dep" @@ -103,12 +101,14 @@ params. c.Flags().AddFlagSet(flagSetYes()) c.Flags().StringSlice(flagDep, []string{}, "add a dependency on another module") - c.Flags().Bool(flagIBC, false, "add IBC functionality") + // c.Flags().Bool(flagIBC, false, "add IBC functionality") c.Flags().String(flagIBCOrdering, "none", "channel ordering of the IBC module [none|ordered|unordered]") c.Flags().Bool(flagRequireRegistration, false, "fail if module can't be registered") c.Flags().StringSlice(flagParams, []string{}, "add module parameters") c.Flags().StringSlice(flagModuleConfigs, []string{}, "add module configs") + _ = c.Flags().MarkDeprecated(flagIBC, "IBC modules are temporarily not supported in Ignite v29 (waiting to IBC compatible version with Cosmos SDK v0.52)") // https://github.com/ignite/cli/pull/4289 + return c } diff --git a/ignite/internal/plugin/testdata/execute_fail/go.mod b/ignite/internal/plugin/testdata/execute_fail/go.mod index 08d1392bfb..a6ceaf395f 100644 --- a/ignite/internal/plugin/testdata/execute_fail/go.mod +++ b/ignite/internal/plugin/testdata/execute_fail/go.mod @@ -1,33 +1,36 @@ module execute_fail -go 1.23 +go 1.23.1 + +replace ( + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.1 + github.com/ignite/cli/v29 => ../../../../.. +) require ( - github.com/hashicorp/go-plugin v1.6.0 + github.com/hashicorp/go-plugin v1.6.1 github.com/ignite/cli/v29 v29.0.0 ) -replace github.com/ignite/cli/v29 => ../../../../.. - require ( dario.cat/mergo v1.0.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect - github.com/aymanbagabas/go-osc52 v1.2.1 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/charmbracelet/lipgloss v0.6.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-sdk v0.50.9 // indirect + github.com/cosmos/cosmos-sdk v0.52.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/color v1.17.0 // indirect github.com/fatih/structs v1.1.0 // indirect - github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/getsentry/sentry-go v0.28.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-git/go-git/v5 v5.12.0 // indirect @@ -51,7 +54,7 @@ require ( github.com/gorilla/css v1.0.0 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.15 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect @@ -60,12 +63,12 @@ require ( github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/microcosm-cc/bluemonday v1.0.23 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.14.0 // indirect + github.com/muesli/termenv v0.15.2 // indirect github.com/oklog/run v1.1.0 // indirect github.com/otiai10/copy v1.14.0 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect @@ -80,18 +83,18 @@ require ( github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - go.etcd.io/bbolt v1.3.9 // indirect - golang.org/x/crypto v0.26.0 // indirect - golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.28.0 // indirect + go.etcd.io/bbolt v1.4.0-alpha.1 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - golang.org/x/tools v0.24.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/tools v0.25.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect - google.golang.org/grpc v1.64.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.66.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/ignite/internal/plugin/testdata/execute_ok/go.mod b/ignite/internal/plugin/testdata/execute_ok/go.mod index ca843ab4b1..426f9ae534 100644 --- a/ignite/internal/plugin/testdata/execute_ok/go.mod +++ b/ignite/internal/plugin/testdata/execute_ok/go.mod @@ -1,33 +1,36 @@ module execute_ok -go 1.23 +go 1.23.1 + +replace ( + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.1 + github.com/ignite/cli/v29 => ../../../../.. +) require ( - github.com/hashicorp/go-plugin v1.6.0 + github.com/hashicorp/go-plugin v1.6.1 github.com/ignite/cli/v29 v29.0.0 ) -replace github.com/ignite/cli/v29 => ../../../../.. - require ( dario.cat/mergo v1.0.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect - github.com/aymanbagabas/go-osc52 v1.2.1 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/charmbracelet/lipgloss v0.6.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-sdk v0.50.9 // indirect + github.com/cosmos/cosmos-sdk v0.52.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/color v1.17.0 // indirect github.com/fatih/structs v1.1.0 // indirect - github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/getsentry/sentry-go v0.28.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-git/go-git/v5 v5.12.0 // indirect @@ -51,7 +54,7 @@ require ( github.com/gorilla/css v1.0.0 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.15 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect @@ -60,12 +63,12 @@ require ( github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/microcosm-cc/bluemonday v1.0.23 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.14.0 // indirect + github.com/muesli/termenv v0.15.2 // indirect github.com/oklog/run v1.1.0 // indirect github.com/otiai10/copy v1.14.0 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect @@ -80,18 +83,18 @@ require ( github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - go.etcd.io/bbolt v1.3.9 // indirect - golang.org/x/crypto v0.26.0 // indirect - golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.28.0 // indirect + go.etcd.io/bbolt v1.4.0-alpha.1 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - golang.org/x/tools v0.24.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/tools v0.25.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect - google.golang.org/grpc v1.64.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.66.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/ignite/internal/tools/gen-config-doc/go.mod b/ignite/internal/tools/gen-config-doc/go.mod index 975d460c73..ec91acfb1d 100644 --- a/ignite/internal/tools/gen-config-doc/go.mod +++ b/ignite/internal/tools/gen-config-doc/go.mod @@ -2,7 +2,10 @@ module github.com/ignite/cli/ignite/internal/tools/gen-config-doc go 1.23 -replace github.com/ignite/cli/v29 => ../../../../ +replace ( + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.1 + github.com/ignite/cli/v29 => ../../../../ +) require ( github.com/gobuffalo/genny/v2 v2.1.0 diff --git a/ignite/internal/tools/gen-mig-diffs/go.mod b/ignite/internal/tools/gen-mig-diffs/go.mod index 078ea3c96c..6e57899f0e 100644 --- a/ignite/internal/tools/gen-mig-diffs/go.mod +++ b/ignite/internal/tools/gen-mig-diffs/go.mod @@ -2,7 +2,10 @@ module github.com/ignite/cli/ignite/internal/tools/gen-mig-diffs go 1.23 -replace github.com/ignite/cli/v29 => ../../../../ +replace ( + github.com/ignite/cli/v29 => ../../../../ + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.1 +) require ( github.com/Masterminds/semver/v3 v3.2.1 diff --git a/ignite/pkg/chaincmd/chaincmd.go b/ignite/pkg/chaincmd/chaincmd.go index c45baf53fc..6c91b49318 100644 --- a/ignite/pkg/chaincmd/chaincmd.go +++ b/ignite/pkg/chaincmd/chaincmd.go @@ -20,12 +20,12 @@ const ( commandGentx = "gentx" commandCollectGentxs = "collect-gentxs" commandValidateGenesis = "validate" + commandExportGenssis = "export" commandShowNodeID = "show-node-id" commandStatus = "status" commandTx = "tx" commandQuery = "query" commandUnsafeReset = "unsafe-reset-all" - commandExport = "export" commandTendermint = "tendermint" commandTestnetInPlace = "in-place-testnet" @@ -492,7 +492,8 @@ func (c ChainCmd) UnsafeResetCommand() step.Option { // ExportCommand returns the command to export the state of the blockchain into a genesis file. func (c ChainCmd) ExportCommand() step.Option { command := []string{ - commandExport, + commandGenesis, + commandExportGenssis, } return c.daemonCommand(command) } diff --git a/ignite/pkg/chaincmd/runner/simulate.go b/ignite/pkg/chaincmd/runner/simulate.go index 323788e658..f805f0df41 100644 --- a/ignite/pkg/chaincmd/runner/simulate.go +++ b/ignite/pkg/chaincmd/runner/simulate.go @@ -14,7 +14,6 @@ func (r Runner) Simulation( ctx context.Context, appPath string, enabled bool, - verbose bool, config simulation.Config, period uint, genesisTime int64, @@ -34,10 +33,7 @@ func (r Runner) Simulation( chaincmd.SimappWithBlockSize(config.BlockSize), chaincmd.SimappWithLean(config.Lean), chaincmd.SimappWithCommit(config.Commit), - chaincmd.SimappWithSimulateEveryOperation(config.OnOperation), - chaincmd.SimappWithPrintAllInvariants(config.AllInvariants), chaincmd.SimappWithEnable(enabled), - chaincmd.SimappWithVerbose(verbose), chaincmd.SimappWithPeriod(period), chaincmd.SimappWithGenesisTime(genesisTime), )) diff --git a/ignite/pkg/chaincmd/simulate.go b/ignite/pkg/chaincmd/simulate.go index 41f9b554ff..4463bd3257 100644 --- a/ignite/pkg/chaincmd/simulate.go +++ b/ignite/pkg/chaincmd/simulate.go @@ -10,24 +10,21 @@ import ( ) const ( - optionSimappGenesis = "-Genesis" - optionSimappParams = "-Params" - optionSimappExportParamsPath = "-ExportParamsPath" - optionSimappExportParamsHeight = "-ExportParamsHeight" - optionSimappExportStatePath = "-ExportStatePath" - optionSimappExportStatsPath = "-ExportStatsPath" - optionSimappSeed = "-Seed" - optionSimappInitialBlockHeight = "-InitialBlockHeight" - optionSimappNumBlocks = "-NumBlocks" - optionSimappBlockSize = "-BlockSize" - optionSimappLean = "-Lean" - optionSimappCommit = "-Commit" - optionSimappSimulateEveryOperation = "-SimulateEveryOperation" - optionSimappPrintAllInvariants = "-PrintAllInvariants" - optionSimappEnabled = "-Enabled" - optionSimappVerbose = "-Verbose" - optionSimappPeriod = "-Period" - optionSimappGenesisTime = "-GenesisTime" + optionSimappGenesis = "-Genesis" + optionSimappParams = "-Params" + optionSimappExportParamsPath = "-ExportParamsPath" + optionSimappExportParamsHeight = "-ExportParamsHeight" + optionSimappExportStatePath = "-ExportStatePath" + optionSimappExportStatsPath = "-ExportStatsPath" + optionSimappSeed = "-Seed" + optionSimappInitialBlockHeight = "-InitialBlockHeight" + optionSimappNumBlocks = "-NumBlocks" + optionSimappBlockSize = "-BlockSize" + optionSimappLean = "-Lean" + optionSimappCommit = "-Commit" + optionSimappEnabled = "-Enabled" + optionSimappPeriod = "-Period" + optionSimappGenesisTime = "-GenesisTime" commandGoTest = "test" optionGoBenchmem = "-benchmem" @@ -150,26 +147,6 @@ func SimappWithCommit(commit bool) SimappOption { } } -// SimappWithSimulateEveryOperation provides simulateEveryOperation option for the simapp command. -func SimappWithSimulateEveryOperation(simulateEveryOperation bool) SimappOption { - return func(command []string) []string { - if simulateEveryOperation { - return append(command, optionSimappSimulateEveryOperation) - } - return command - } -} - -// SimappWithPrintAllInvariants provides printAllInvariants option for the simapp command. -func SimappWithPrintAllInvariants(printAllInvariants bool) SimappOption { - return func(command []string) []string { - if printAllInvariants { - return append(command, optionSimappPrintAllInvariants) - } - return command - } -} - // SimappWithEnable provides enable option for the simapp command. func SimappWithEnable(enable bool) SimappOption { return func(command []string) []string { @@ -180,16 +157,6 @@ func SimappWithEnable(enable bool) SimappOption { } } -// SimappWithVerbose provides verbose option for the simapp command. -func SimappWithVerbose(verbose bool) SimappOption { - return func(command []string) []string { - if verbose { - return append(command, optionSimappVerbose) - } - return command - } -} - // SimappWithPeriod provides period option for the simapp command. func SimappWithPeriod(period uint) SimappOption { return func(command []string) []string { diff --git a/ignite/pkg/cosmosaccount/cosmosaccount.go b/ignite/pkg/cosmosaccount/cosmosaccount.go index 69a865f686..265d638d94 100644 --- a/ignite/pkg/cosmosaccount/cosmosaccount.go +++ b/ignite/pkg/cosmosaccount/cosmosaccount.go @@ -335,7 +335,7 @@ func (r Registry) DeleteByName(name string) error { } func (r Registry) hdPath() string { - return hd.CreateHDPath(sdktypes.GetConfig().GetCoinType(), 0, 0).String() + return hd.CreateHDPath(sdktypes.CoinType, 0, 0).String() } func (r Registry) algo() (keyring.SignatureAlgo, error) { diff --git a/ignite/pkg/cosmosanalysis/app/app_test.go b/ignite/pkg/cosmosanalysis/app/app_test.go index d404e34268..b8899197fa 100644 --- a/ignite/pkg/cosmosanalysis/app/app_test.go +++ b/ignite/pkg/cosmosanalysis/app/app_test.go @@ -81,9 +81,9 @@ func TestCheckKeeper(t *testing.T) { func TestFindRegisteredModules(t *testing.T) { basicModules := []string{ "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/cosmos/cosmos-sdk/x/gov", + "cosmossdk.io/x/bank", + "cosmossdk.io/x/staking", + "cosmossdk.io/x/gov", "github.com/username/test/x/foo", "github.com/cosmos/cosmos-sdk/x/auth/tx", "github.com/cosmos/cosmos-sdk/client/grpc/tmservice", @@ -98,7 +98,7 @@ func TestFindRegisteredModules(t *testing.T) { { name: "new basic manager with only a app.go", path: "testdata/modules/single_app", - expectedModules: basicModules, + expectedModules: append(basicModules, "github.com/cosmos/ibc-go/v7/modules/core"), }, { name: "with runtime api routes", @@ -117,143 +117,23 @@ func TestFindRegisteredModules(t *testing.T) { "github.com/cosmos/cosmos-sdk/x/auth/tx", "github.com/cosmos/cosmos-sdk/x/auth/tx/config", "github.com/cosmos/cosmos-sdk/x/auth/vesting", - "github.com/cosmos/cosmos-sdk/x/authz/module", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/consensus", - "github.com/cosmos/cosmos-sdk/x/crisis", - "github.com/cosmos/cosmos-sdk/x/distribution", - "github.com/cosmos/cosmos-sdk/x/group/module", - "github.com/cosmos/cosmos-sdk/x/mint", - "github.com/cosmos/cosmos-sdk/x/params", - "github.com/cosmos/cosmos-sdk/x/slashing", - "github.com/cosmos/cosmos-sdk/x/staking", + "cosmossdk.io/x/authz/module", + "cosmossdk.io/x/bank", + "cosmossdk.io/x/consensus", + "cosmossdk.io/x/crisis", + "cosmossdk.io/x/distribution", + "cosmossdk.io/x/group/module", + "cosmossdk.io/x/mint", + "cosmossdk.io/x/params", + "cosmossdk.io/x/slashing", + "cosmossdk.io/x/staking", "github.com/ignite/mars/x/mars", - "github.com/cosmos/cosmos-sdk/x/gov", + "cosmossdk.io/x/gov", "github.com/username/test/x/foo", "github.com/cosmos/cosmos-sdk/client/grpc/tmservice", "github.com/cosmos/cosmos-sdk/client/grpc/node", }, }, - { - name: "gaia", - path: "testdata/modules/gaia", - expectedModules: []string{ - "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/capability", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/cosmos/cosmos-sdk/x/mint", - "github.com/cosmos/cosmos-sdk/x/distribution", - "github.com/cosmos/cosmos-sdk/x/gov", - "github.com/cosmos/cosmos-sdk/x/params", - "github.com/cosmos/cosmos-sdk/x/crisis", - "github.com/cosmos/cosmos-sdk/x/slashing", - "github.com/cosmos/cosmos-sdk/x/feegrant", - "github.com/cosmos/cosmos-sdk/x/authz", - "github.com/cosmos/cosmos-sdk/x/group", - "github.com/cosmos/ibc-go/v5/modules/core", - "github.com/cosmos/cosmos-sdk/x/upgrade", - "github.com/cosmos/cosmos-sdk/x/evidence", - "github.com/cosmos/ibc-go/v5/modules/apps/transfer", - "github.com/gravity-devs/liquidity/v2/x/liquidity", - "github.com/strangelove-ventures/packet-forward-middleware/v2/router", - "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts", - "github.com/cosmos/gaia/v8/x/icamauth", - "github.com/cosmos/cosmos-sdk/client/docs/statik", - }, - }, - { - name: "crescent", - path: "testdata/modules/crescent", - expectedModules: []string{ - "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/capability", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/crescent-network/crescent/v3/x/mint", - "github.com/cosmos/cosmos-sdk/x/distribution", - "github.com/cosmos/cosmos-sdk/x/gov", - "github.com/cosmos/cosmos-sdk/x/params", - "github.com/cosmos/cosmos-sdk/x/crisis", - "github.com/cosmos/cosmos-sdk/x/slashing", - "github.com/cosmos/cosmos-sdk/x/feegrant", - "github.com/cosmos/cosmos-sdk/x/authz", - "github.com/cosmos/ibc-go/v2/modules/core", - "github.com/cosmos/cosmos-sdk/x/upgrade", - "github.com/cosmos/cosmos-sdk/x/evidence", - "github.com/cosmos/ibc-go/v2/modules/apps/transfer", - "github.com/tendermint/budget/x/budget", - "github.com/crescent-network/crescent/v3/x/farming", - "github.com/crescent-network/crescent/v3/x/liquidity", - "github.com/crescent-network/crescent/v3/x/liquidstaking", - "github.com/crescent-network/crescent/v3/x/liquidfarming", - "github.com/crescent-network/crescent/v3/x/claim", - "github.com/crescent-network/crescent/v3/x/marketmaker", - "github.com/crescent-network/crescent/v3/x/lpfarm", - "github.com/crescent-network/crescent/v3/client/docs/statik", - }, - }, - { - name: "spn", - path: "testdata/modules/spn", - expectedModules: []string{ - "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/auth/tx", - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice", - "github.com/cosmos/cosmos-sdk/client/grpc/node", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/capability", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/ignite/modules/x/mint", - "github.com/cosmos/cosmos-sdk/x/distribution", - "github.com/cosmos/cosmos-sdk/x/gov", - "github.com/cosmos/cosmos-sdk/x/params", - "github.com/cosmos/cosmos-sdk/x/crisis", - "github.com/cosmos/cosmos-sdk/x/slashing", - "github.com/cosmos/cosmos-sdk/x/feegrant", - "github.com/cosmos/cosmos-sdk/x/authz", - "github.com/cosmos/ibc-go/v6/modules/core", - "github.com/cosmos/cosmos-sdk/x/upgrade", - "github.com/cosmos/cosmos-sdk/x/evidence", - "github.com/cosmos/ibc-go/v6/modules/apps/transfer", - "github.com/tendermint/spn/x/participation", - "github.com/ignite/modules/x/claim", - "github.com/tendermint/spn/x/profile", - "github.com/tendermint/spn/x/launch", - "github.com/tendermint/spn/x/campaign", - "github.com/tendermint/spn/x/monitoringc", - "github.com/tendermint/spn/x/monitoringp", - "github.com/tendermint/spn/x/reward", - "github.com/tendermint/fundraising/x/fundraising", - }, - }, - { - name: "juno", - path: "testdata/modules/juno", - expectedModules: []string{ - "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/capability", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/CosmosContracts/juno/v10/x/mint", - "github.com/cosmos/cosmos-sdk/x/distribution", - "github.com/cosmos/cosmos-sdk/x/gov", - "github.com/cosmos/cosmos-sdk/x/params", - "github.com/cosmos/cosmos-sdk/x/crisis", - "github.com/cosmos/cosmos-sdk/x/slashing", - "github.com/cosmos/ibc-go/v3/modules/core", - "github.com/cosmos/cosmos-sdk/x/feegrant", - "github.com/cosmos/cosmos-sdk/x/upgrade", - "github.com/cosmos/cosmos-sdk/x/evidence", - "github.com/cosmos/ibc-go/v3/modules/apps/transfer", - "github.com/cosmos/cosmos-sdk/x/authz", - "github.com/CosmWasm/wasmd/x/wasm", - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts", - "github.com/cosmos/cosmos-sdk/x/auth/tx", - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice", - "github.com/cosmos/cosmos-sdk/client/grpc/node", - }, - }, } for _, tt := range cases { @@ -268,9 +148,9 @@ func TestFindRegisteredModules(t *testing.T) { func TestDiscoverModules(t *testing.T) { basicModules := []string{ "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/cosmos/cosmos-sdk/x/gov", + "cosmossdk.io/x/bank", + "cosmossdk.io/x/staking", + "cosmossdk.io/x/gov", "github.com/username/test/x/foo", "github.com/cosmos/cosmos-sdk/x/auth/tx", "github.com/cosmos/cosmos-sdk/client/grpc/tmservice", @@ -285,7 +165,7 @@ func TestDiscoverModules(t *testing.T) { { name: "new basic manager with only a app.go", path: "testdata/modules/single_app", - expectedModules: basicModules, + expectedModules: append(basicModules, "github.com/cosmos/ibc-go/v7/modules/core"), }, { name: "with app_config.go file", @@ -297,124 +177,6 @@ func TestDiscoverModules(t *testing.T) { path: "testdata/modules/runtime", expectedModules: basicModules, }, - { - name: "gaia", - path: "testdata/modules/gaia", - expectedModules: []string{ - "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/capability", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/cosmos/cosmos-sdk/x/mint", - "github.com/cosmos/cosmos-sdk/x/distribution", - "github.com/cosmos/cosmos-sdk/x/gov", - "github.com/cosmos/cosmos-sdk/x/params", - "github.com/cosmos/cosmos-sdk/x/crisis", - "github.com/cosmos/cosmos-sdk/x/slashing", - "github.com/cosmos/cosmos-sdk/x/feegrant", - "github.com/cosmos/cosmos-sdk/x/authz", - "github.com/cosmos/cosmos-sdk/x/group", - "github.com/cosmos/ibc-go/v5/modules/core", - "github.com/cosmos/cosmos-sdk/x/upgrade", - "github.com/cosmos/cosmos-sdk/x/evidence", - "github.com/cosmos/ibc-go/v5/modules/apps/transfer", - "github.com/gravity-devs/liquidity/v2/x/liquidity", - "github.com/strangelove-ventures/packet-forward-middleware/v2/router", - "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts", - "github.com/cosmos/gaia/v8/x/icamauth", - }, - }, - { - name: "crescent", - path: "testdata/modules/crescent", - expectedModules: []string{ - "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/capability", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/crescent-network/crescent/v3/x/mint", - "github.com/cosmos/cosmos-sdk/x/distribution", - "github.com/cosmos/cosmos-sdk/x/gov", - "github.com/cosmos/cosmos-sdk/x/params", - "github.com/cosmos/cosmos-sdk/x/crisis", - "github.com/cosmos/cosmos-sdk/x/slashing", - "github.com/cosmos/cosmos-sdk/x/feegrant", - "github.com/cosmos/cosmos-sdk/x/authz", - "github.com/cosmos/ibc-go/v2/modules/core", - "github.com/cosmos/cosmos-sdk/x/upgrade", - "github.com/cosmos/cosmos-sdk/x/evidence", - "github.com/cosmos/ibc-go/v2/modules/apps/transfer", - "github.com/tendermint/budget/x/budget", - "github.com/crescent-network/crescent/v3/x/farming", - "github.com/crescent-network/crescent/v3/x/liquidity", - "github.com/crescent-network/crescent/v3/x/liquidstaking", - "github.com/crescent-network/crescent/v3/x/liquidfarming", - "github.com/crescent-network/crescent/v3/x/claim", - "github.com/crescent-network/crescent/v3/x/marketmaker", - "github.com/crescent-network/crescent/v3/x/lpfarm", - }, - }, - { - name: "spn", - path: "testdata/modules/spn", - expectedModules: []string{ - "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/auth/tx", - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice", - "github.com/cosmos/cosmos-sdk/client/grpc/node", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/capability", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/ignite/modules/x/mint", - "github.com/cosmos/cosmos-sdk/x/distribution", - "github.com/cosmos/cosmos-sdk/x/gov", - "github.com/cosmos/cosmos-sdk/x/params", - "github.com/cosmos/cosmos-sdk/x/crisis", - "github.com/cosmos/cosmos-sdk/x/slashing", - "github.com/cosmos/cosmos-sdk/x/feegrant", - "github.com/cosmos/cosmos-sdk/x/authz", - "github.com/cosmos/ibc-go/v6/modules/core", - "github.com/cosmos/cosmos-sdk/x/upgrade", - "github.com/cosmos/cosmos-sdk/x/evidence", - "github.com/cosmos/ibc-go/v6/modules/apps/transfer", - "github.com/tendermint/spn/x/participation", - "github.com/ignite/modules/x/claim", - "github.com/tendermint/spn/x/profile", - "github.com/tendermint/spn/x/launch", - "github.com/tendermint/spn/x/campaign", - "github.com/tendermint/spn/x/monitoringc", - "github.com/tendermint/spn/x/monitoringp", - "github.com/tendermint/spn/x/reward", - "github.com/tendermint/fundraising/x/fundraising", - }, - }, - { - name: "juno", - path: "testdata/modules/juno", - expectedModules: []string{ - "github.com/cosmos/cosmos-sdk/x/auth", - "github.com/cosmos/cosmos-sdk/x/bank", - "github.com/cosmos/cosmos-sdk/x/capability", - "github.com/cosmos/cosmos-sdk/x/staking", - "github.com/CosmosContracts/juno/v10/x/mint", - "github.com/cosmos/cosmos-sdk/x/distribution", - "github.com/cosmos/cosmos-sdk/x/gov", - "github.com/cosmos/cosmos-sdk/x/params", - "github.com/cosmos/cosmos-sdk/x/crisis", - "github.com/cosmos/cosmos-sdk/x/slashing", - "github.com/cosmos/ibc-go/v3/modules/core", - "github.com/cosmos/cosmos-sdk/x/feegrant", - "github.com/cosmos/cosmos-sdk/x/upgrade", - "github.com/cosmos/cosmos-sdk/x/evidence", - "github.com/cosmos/ibc-go/v3/modules/apps/transfer", - "github.com/cosmos/cosmos-sdk/x/authz", - "github.com/CosmWasm/wasmd/x/wasm", - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts", - "github.com/cosmos/cosmos-sdk/x/auth/tx", - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice", - "github.com/cosmos/cosmos-sdk/client/grpc/node", - }, - }, } for _, tt := range cases { diff --git a/ignite/pkg/cosmosanalysis/app/testdata/app_di.go b/ignite/pkg/cosmosanalysis/app/testdata/app_di.go index effb908a0b..a13d1548b7 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/app_di.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/app_di.go @@ -12,12 +12,39 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + authzkeeper "cosmossdk.io/x/authz/keeper" + authzmodule "cosmossdk.io/x/authz/module" + "cosmossdk.io/x/bank" + bankkeeper "cosmossdk.io/x/bank/keeper" + consensus "cosmossdk.io/x/consensus" + consensuskeeper "cosmossdk.io/x/consensus/keeper" + "cosmossdk.io/x/crisis" + crisiskeeper "cosmossdk.io/x/crisis/keeper" + distr "cosmossdk.io/x/distribution" + distrkeeper "cosmossdk.io/x/distribution/keeper" "cosmossdk.io/x/evidence" evidencekeeper "cosmossdk.io/x/evidence/keeper" feegrantkeeper "cosmossdk.io/x/feegrant/keeper" feegrantmodule "cosmossdk.io/x/feegrant/module" + "cosmossdk.io/x/genutil" + genutiltypes "cosmossdk.io/x/genutil/types" + "cosmossdk.io/x/gov" + govclient "cosmossdk.io/x/gov/client" + govkeeper "cosmossdk.io/x/gov/keeper" + groupkeeper "cosmossdk.io/x/group/keeper" + groupmodule "cosmossdk.io/x/group/module" + "cosmossdk.io/x/mint" + mintkeeper "cosmossdk.io/x/mint/keeper" nftkeeper "cosmossdk.io/x/nft/keeper" nftmodule "cosmossdk.io/x/nft/module" + "cosmossdk.io/x/params" + paramsclient "cosmossdk.io/x/params/client" + paramskeeper "cosmossdk.io/x/params/keeper" + paramstypes "cosmossdk.io/x/params/types" + "cosmossdk.io/x/slashing" + slashingkeeper "cosmossdk.io/x/slashing/keeper" + "cosmossdk.io/x/staking" + stakingkeeper "cosmossdk.io/x/staking/keeper" "cosmossdk.io/x/upgrade" upgradekeeper "cosmossdk.io/x/upgrade/keeper" dbm "github.com/cosmos/cosmos-db" @@ -38,33 +65,6 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" - "github.com/cosmos/cosmos-sdk/x/bank" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - consensus "github.com/cosmos/cosmos-sdk/x/consensus" - consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - "github.com/cosmos/cosmos-sdk/x/crisis" - crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "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" - groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" - groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" - "github.com/cosmos/cosmos-sdk/x/mint" - mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" - "github.com/cosmos/cosmos-sdk/x/params" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/cosmos/cosmos-sdk/x/slashing" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - "github.com/cosmos/cosmos-sdk/x/staking" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/ignite/pkg/cosmosanalysis/app/testdata/app_generic.go b/ignite/pkg/cosmosanalysis/app/testdata/app_generic.go index 8a1d861d9c..51ec78e200 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/app_generic.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/app_generic.go @@ -1,11 +1,11 @@ package foo import ( + paramstypes "cosmossdk.io/x/params/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" abci "github.com/tendermint/tendermint/abci/types" app "github.com/ignite/cli/v29/ignite/pkg/cosmosanalysis/app/testdata/modules/registration_not_in_app_go" diff --git a/ignite/pkg/cosmosanalysis/app/testdata/app_minimal.go b/ignite/pkg/cosmosanalysis/app/testdata/app_minimal.go index b7fadb975c..b485e2efec 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/app_minimal.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/app_minimal.go @@ -1,11 +1,11 @@ package foo import ( + paramstypes "cosmossdk.io/x/params/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" abci "github.com/tendermint/tendermint/abci/types" app "github.com/ignite/cli/v29/ignite/pkg/cosmosanalysis/app/testdata/modules/registration_not_in_app_go" diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app.go b/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app.go index c26b0eef3d..ea8ca40aa5 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app.go @@ -1,6 +1,10 @@ package app import ( + bankkeeper "cosmossdk.io/x/bank/keeper" + govkeeper "cosmossdk.io/x/gov/keeper" + paramstypes "cosmossdk.io/x/params/types" + stakingkeeper "cosmossdk.io/x/staking/keeper" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" @@ -9,10 +13,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/gogo/protobuf/codec" abci "github.com/tendermint/tendermint/abci/types" fookeeper "github.com/username/test/x/foo/keeper" diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app_config.go b/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app_config.go index 9551653075..f4e231f308 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app_config.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app_config.go @@ -26,13 +26,37 @@ import ( vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" + "cosmossdk.io/x/authz" + _ "cosmossdk.io/x/authz/module" // import for side-effects + _ "cosmossdk.io/x/bank" // import for side-effects + banktypes "cosmossdk.io/x/bank/types" _ "cosmossdk.io/x/circuit" // import for side-effects circuittypes "cosmossdk.io/x/circuit/types" + _ "cosmossdk.io/x/consensus" // import for side-effects + consensustypes "cosmossdk.io/x/consensus/types" + _ "cosmossdk.io/x/crisis" // import for side-effects + crisistypes "cosmossdk.io/x/crisis/types" + _ "cosmossdk.io/x/distribution" // import for side-effects + distrtypes "cosmossdk.io/x/distribution/types" _ "cosmossdk.io/x/evidence" // import for side-effects evidencetypes "cosmossdk.io/x/evidence/types" "cosmossdk.io/x/feegrant" _ "cosmossdk.io/x/feegrant/module" // import for side-effects - _ "cosmossdk.io/x/upgrade" // import for side-effects + "cosmossdk.io/x/genutil" + genutiltypes "cosmossdk.io/x/genutil/types" + "cosmossdk.io/x/gov" + govtypes "cosmossdk.io/x/gov/types" + "cosmossdk.io/x/group" + _ "cosmossdk.io/x/group/module" // import for side-effects + _ "cosmossdk.io/x/mint" // import for side-effects + minttypes "cosmossdk.io/x/mint/types" + _ "cosmossdk.io/x/params" // import for side-effects + paramstypes "cosmossdk.io/x/params/types" + _ "cosmossdk.io/x/slashing" // import for side-effects + slashingtypes "cosmossdk.io/x/slashing/types" + _ "cosmossdk.io/x/staking" // import for side-effects + stakingtypes "cosmossdk.io/x/staking/types" + _ "cosmossdk.io/x/upgrade" // import for side-effects upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/types/module" @@ -40,30 +64,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import for side-effects vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/cosmos/cosmos-sdk/x/authz" - _ "github.com/cosmos/cosmos-sdk/x/authz/module" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects - consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - _ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - _ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/cosmos/cosmos-sdk/x/gov" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/cosmos-sdk/x/group" - _ "github.com/cosmos/cosmos-sdk/x/group/module" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - _ "github.com/cosmos/cosmos-sdk/x/params" // import for side-effects - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - _ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/crescent/app.go b/ignite/pkg/cosmosanalysis/app/testdata/modules/crescent/app.go deleted file mode 100644 index 8f62ea2118..0000000000 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/crescent/app.go +++ /dev/null @@ -1,1034 +0,0 @@ -package app - -// DONTCOVER - -import ( - "encoding/json" - "fmt" - "io" - "net/http" - "os" - "path/filepath" - - storetypes "cosmossdk.io/store/types" - - "cosmossdk.io/client/v2/autocli" - "github.com/gorilla/mux" - "github.com/rakyll/statik/fs" - "github.com/spf13/cast" - - "github.com/ignite/cli/v29/ignite/pkg/errors" - - "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" - "github.com/cosmos/cosmos-sdk/server/config" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/cosmos/cosmos-sdk/x/auth/ante" - 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" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/auth/vesting" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/cosmos/cosmos-sdk/x/authz" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" - "github.com/cosmos/cosmos-sdk/x/bank" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/cosmos-sdk/x/crisis" - crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "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" - "github.com/cosmos/cosmos-sdk/x/params" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/cosmos/cosmos-sdk/x/slashing" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - "github.com/cosmos/cosmos-sdk/x/staking" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - 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/v2/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v2/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v2/modules/core" - ibcclient "github.com/cosmos/ibc-go/v2/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v2/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v2/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v2/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v2/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v2/modules/core/keeper" - "github.com/tendermint/budget/x/budget" - budgetkeeper "github.com/tendermint/budget/x/budget/keeper" - budgettypes "github.com/tendermint/budget/x/budget/types" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - dbm "github.com/tendermint/tm-db" - - farmingparams "github.com/crescent-network/crescent/v3/app/params" - v2_0_0 "github.com/crescent-network/crescent/v3/app/upgrades/mainnet/v2.0.0" - v3 "github.com/crescent-network/crescent/v3/app/upgrades/mainnet/v3" - "github.com/crescent-network/crescent/v3/app/upgrades/testnet/rc4" - "github.com/crescent-network/crescent/v3/x/claim" - claimkeeper "github.com/crescent-network/crescent/v3/x/claim/keeper" - claimtypes "github.com/crescent-network/crescent/v3/x/claim/types" - "github.com/crescent-network/crescent/v3/x/farming" - farmingclient "github.com/crescent-network/crescent/v3/x/farming/client" - farmingkeeper "github.com/crescent-network/crescent/v3/x/farming/keeper" - farmingtypes "github.com/crescent-network/crescent/v3/x/farming/types" - "github.com/crescent-network/crescent/v3/x/liquidfarming" - liquidfarmingkeeper "github.com/crescent-network/crescent/v3/x/liquidfarming/keeper" - liquidfarmingtypes "github.com/crescent-network/crescent/v3/x/liquidfarming/types" - "github.com/crescent-network/crescent/v3/x/liquidity" - liquiditykeeper "github.com/crescent-network/crescent/v3/x/liquidity/keeper" - liquiditytypes "github.com/crescent-network/crescent/v3/x/liquidity/types" - "github.com/crescent-network/crescent/v3/x/liquidstaking" - liquidstakingkeeper "github.com/crescent-network/crescent/v3/x/liquidstaking/keeper" - liquidstakingtypes "github.com/crescent-network/crescent/v3/x/liquidstaking/types" - "github.com/crescent-network/crescent/v3/x/lpfarm" - lpfarmclient "github.com/crescent-network/crescent/v3/x/lpfarm/client" - lpfarmkeeper "github.com/crescent-network/crescent/v3/x/lpfarm/keeper" - lpfarmtypes "github.com/crescent-network/crescent/v3/x/lpfarm/types" - "github.com/crescent-network/crescent/v3/x/marketmaker" - marketmakerclient "github.com/crescent-network/crescent/v3/x/marketmaker/client" - marketmakerkeeper "github.com/crescent-network/crescent/v3/x/marketmaker/keeper" - marketmakertypes "github.com/crescent-network/crescent/v3/x/marketmaker/types" - "github.com/crescent-network/crescent/v3/x/mint" - mintkeeper "github.com/crescent-network/crescent/v3/x/mint/keeper" - minttypes "github.com/crescent-network/crescent/v3/x/mint/types" - - // unnamed import of statik for swagger UI support - _ "github.com/crescent-network/crescent/v3/client/docs/statik" -) - -var ( - // DefaultNodeHome default home directories for the application daemon - DefaultNodeHome string - - // ModuleBasics defines the module BasicManager is in charge of setting up basic, - // non-dependant module elements, such as codec registration - // and genesis verification. - ModuleBasics = module.NewBasicManager( - auth.AppModuleBasic{}, - genutil.AppModuleBasic{}, - bank.AppModuleBasic{}, - capability.AppModuleBasic{}, - staking.AppModuleBasic{}, - mint.AppModuleBasic{}, - distr.AppModuleBasic{}, - gov.NewAppModuleBasic( - paramsclient.ProposalHandler, - distrclient.ProposalHandler, - upgradeclient.ProposalHandler, - upgradeclient.CancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, - ibcclientclient.UpgradeProposalHandler, - farmingclient.ProposalHandler, - marketmakerclient.ProposalHandler, - lpfarmclient.ProposalHandler, - ), - params.AppModuleBasic{}, - crisis.AppModuleBasic{}, - slashing.AppModuleBasic{}, - feegrantmodule.AppModuleBasic{}, - authzmodule.AppModuleBasic{}, - ibc.AppModuleBasic{}, - upgrade.AppModuleBasic{}, - evidence.AppModuleBasic{}, - transfer.AppModuleBasic{}, - vesting.AppModuleBasic{}, - budget.AppModuleBasic{}, - farming.AppModuleBasic{}, - liquidity.AppModuleBasic{}, - liquidstaking.AppModuleBasic{}, - liquidfarming.AppModuleBasic{}, - claim.AppModuleBasic{}, - marketmaker.AppModuleBasic{}, - lpfarm.AppModuleBasic{}, - ) - - // module account permissions - maccPerms = map[string][]string{ - authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, - minttypes.ModuleName: {authtypes.Minter}, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - govtypes.ModuleName: {authtypes.Burner}, - budgettypes.ModuleName: nil, - farmingtypes.ModuleName: nil, - liquiditytypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - liquidstakingtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - liquidfarmingtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - claimtypes.ModuleName: nil, - ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - marketmakertypes.ModuleName: nil, - lpfarmtypes.ModuleName: nil, - } -) - -// Verify app interface at compile time -var ( - _ simapp.App = (*App)(nil) - _ servertypes.Application = (*App)(nil) -) - -// App extends an ABCI application, but with most of its parameters exported. -// They are exported for convenience in creating helper functions, as object -// capabilities aren't needed for testing. -type App struct { - *baseapp.BaseApp - 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 - - // keepers - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper *stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - IBCKeeper *ibckeeper.Keeper - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper - AuthzKeeper authzkeeper.Keeper - BudgetKeeper budgetkeeper.Keeper - FarmingKeeper farmingkeeper.Keeper - LiquidityKeeper liquiditykeeper.Keeper - LiquidStakingKeeper liquidstakingkeeper.Keeper - LiquidFarmingKeeper liquidfarmingkeeper.Keeper - ClaimKeeper claimkeeper.Keeper - MarketMakerKeeper marketmakerkeeper.Keeper - LPFarmKeeper lpfarmkeeper.Keeper - - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedTransferKeeper capabilitykeeper.ScopedKeeper - - transferModule transfer.AppModule - // the module manager - mm *module.Manager - - // simulation manager - sm *module.SimulationManager - - // module configurator - configurator module.Configurator -} - -func init() { - userHomeDir, err := os.UserHomeDir() - if err != nil { - panic(err) - } - - DefaultNodeHome = filepath.Join(userHomeDir, AppUserHomeDir) -} - -// NewApp returns a reference to an initialized App. -func NewApp( - logger log.Logger, - db dbm.DB, - traceStore io.Writer, - loadLatest bool, - skipUpgradeHeights map[int64]bool, - homePath string, - invCheckPeriod uint, - encodingConfig farmingparams.EncodingConfig, - appOpts servertypes.AppOptions, - baseAppOptions ...func(*baseapp.BaseApp), -) *App { - appCodec := encodingConfig.Marshaler - legacyAmino := encodingConfig.Amino - interfaceRegistry := encodingConfig.InterfaceRegistry - - bApp := baseapp.NewBaseApp(AppName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) - bApp.SetCommitMultiStoreTracer(traceStore) - bApp.SetVersion(version.Version) - bApp.SetInterfaceRegistry(interfaceRegistry) - - keys := sdk.NewKVStoreKeys( - authtypes.StoreKey, - banktypes.StoreKey, - stakingtypes.StoreKey, - minttypes.StoreKey, - distrtypes.StoreKey, - slashingtypes.StoreKey, - govtypes.StoreKey, - paramstypes.StoreKey, - ibchost.StoreKey, - upgradetypes.StoreKey, - evidencetypes.StoreKey, - ibctransfertypes.StoreKey, - capabilitytypes.StoreKey, - feegrant.StoreKey, - authzkeeper.StoreKey, - budgettypes.StoreKey, - farmingtypes.StoreKey, - liquiditytypes.StoreKey, - liquidstakingtypes.StoreKey, - liquidfarmingtypes.StoreKey, - claimtypes.StoreKey, - marketmakertypes.StoreKey, - lpfarmtypes.StoreKey, - ) - tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) - memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) - - app := &App{ - BaseApp: bApp, - legacyAmino: legacyAmino, - appCodec: appCodec, - interfaceRegistry: interfaceRegistry, - invCheckPeriod: invCheckPeriod, - keys: keys, - tkeys: tkeys, - memKeys: memKeys, - } - - app.ParamsKeeper = initParamsKeeper( - appCodec, - legacyAmino, - keys[paramstypes.StoreKey], - tkeys[paramstypes.TStoreKey], - ) - - // set the BaseApp's parameter store - bApp.SetParamStore( - app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramskeeper.ConsensusParamsKeyTable()), - ) - - app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) - scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - app.CapabilityKeeper.Seal() - - // add keepers - app.AccountKeeper = authkeeper.NewAccountKeeper( - appCodec, - keys[authtypes.StoreKey], - app.GetSubspace(authtypes.ModuleName), - authtypes.ProtoBaseAccount, - maccPerms, - ) - app.BankKeeper = bankkeeper.NewBaseKeeper( - appCodec, - keys[banktypes.StoreKey], - app.AccountKeeper, - app.GetSubspace(banktypes.ModuleName), - app.ModuleAccountAddrs(), - ) - app.AuthzKeeper = authzkeeper.NewKeeper( - keys[authzkeeper.StoreKey], - appCodec, - app.BaseApp.MsgServiceRouter(), - ) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper( - appCodec, - keys[feegrant.StoreKey], - app.AccountKeeper, - ) - stakingKeeper := stakingkeeper.NewKeeper( - appCodec, - keys[stakingtypes.StoreKey], - app.AccountKeeper, - app.BankKeeper, - app.GetSubspace(stakingtypes.ModuleName), - ) - app.StakingKeeper = &stakingKeeper - - app.MintKeeper = mintkeeper.NewKeeper( - appCodec, - keys[minttypes.StoreKey], - app.GetSubspace(minttypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - authtypes.FeeCollectorName, - ) - - app.DistrKeeper = distrkeeper.NewKeeper( - appCodec, - keys[distrtypes.StoreKey], - app.GetSubspace(distrtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.StakingKeeper, - authtypes.FeeCollectorName, - app.ModuleAccountAddrs(), - ) - app.SlashingKeeper = slashingkeeper.NewKeeper( - appCodec, - keys[slashingtypes.StoreKey], - app.StakingKeeper, - app.GetSubspace(slashingtypes.ModuleName), - ) - app.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), - invCheckPeriod, - app.BankKeeper, - authtypes.FeeCollectorName, - ) - app.UpgradeKeeper = upgradekeeper.NewKeeper( - skipUpgradeHeights, - keys[upgradetypes.StoreKey], - appCodec, - homePath, - app.BaseApp, - ) - - // register the staking hooks - // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper = app.StakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), - ) - app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, - keys[ibchost.StoreKey], - app.GetSubspace(ibchost.ModuleName), - app.StakingKeeper, - app.UpgradeKeeper, - scopedIBCKeeper, - ) - app.BudgetKeeper = budgetkeeper.NewKeeper( - appCodec, - keys[budgettypes.StoreKey], - app.GetSubspace(budgettypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.ModuleAccountAddrs(), - ) - app.FarmingKeeper = farmingkeeper.NewKeeper( - appCodec, - keys[farmingtypes.StoreKey], - app.GetSubspace(farmingtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - ) - app.LiquidityKeeper = liquiditykeeper.NewKeeper( - appCodec, - keys[liquiditytypes.StoreKey], - app.GetSubspace(liquiditytypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - ) - app.MarketMakerKeeper = marketmakerkeeper.NewKeeper( - appCodec, - keys[marketmakertypes.StoreKey], - app.GetSubspace(marketmakertypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - ) - app.LPFarmKeeper = lpfarmkeeper.NewKeeper( - appCodec, - keys[lpfarmtypes.StoreKey], - app.GetSubspace(lpfarmtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.LiquidityKeeper, - ) - - // register the proposal types - govRouter := govtypes.NewRouter() - govRouter. - AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). - AddRoute(farmingtypes.RouterKey, farming.NewPublicPlanProposalHandler(app.FarmingKeeper)). - AddRoute(marketmakertypes.RouterKey, marketmaker.NewMarketMakerProposalHandler(app.MarketMakerKeeper)). - AddRoute(lpfarmtypes.RouterKey, lpfarm.NewFarmingPlanProposalHandler(app.LPFarmKeeper)) - - app.GovKeeper = govkeeper.NewKeeper( - appCodec, - keys[govtypes.StoreKey], - app.GetSubspace(govtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.StakingKeeper, - govRouter, - ) - - app.LiquidStakingKeeper = liquidstakingkeeper.NewKeeper( - appCodec, - keys[liquidstakingtypes.StoreKey], - app.GetSubspace(liquidstakingtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.StakingKeeper, - app.DistrKeeper, - app.LiquidityKeeper, - app.LPFarmKeeper, - app.SlashingKeeper, - ) - - app.LiquidFarmingKeeper = liquidfarmingkeeper.NewKeeper( - appCodec, - keys[liquidfarmingtypes.StoreKey], - app.GetSubspace(liquidfarmingtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.LPFarmKeeper, - app.LiquidityKeeper, - ) - - app.GovKeeper = *app.GovKeeper.SetHooks( - govtypes.NewMultiGovHooks( - app.LiquidStakingKeeper.Hooks(), - ), - ) - - app.ClaimKeeper = claimkeeper.NewKeeper( - appCodec, - keys[claimtypes.StoreKey], - app.BankKeeper, - app.DistrKeeper, - app.GovKeeper, - app.LiquidityKeeper, - app.LiquidStakingKeeper, - ) - - app.TransferKeeper = ibctransferkeeper.NewKeeper( - appCodec, - keys[ibctransfertypes.StoreKey], - app.GetSubspace(ibctransfertypes.ModuleName), - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - app.AccountKeeper, - app.BankKeeper, - scopedTransferKeeper, - ) - app.transferModule = transfer.NewAppModule(app.TransferKeeper) - - // create static IBC router, add transfer route, then set and seal it - ibcRouter := porttypes.NewRouter() - ibcRouter.AddRoute(ibctransfertypes.ModuleName, app.transferModule) - app.IBCKeeper.SetRouter(ibcRouter) - - // create evidence keeper with router - evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, - keys[evidencetypes.StoreKey], - app.StakingKeeper, - app.SlashingKeeper, - ) - - app.EvidenceKeeper = *evidenceKeeper - - skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) - - // NOTE: Any module instantiated in the module manager that is later modified - // must be passed by reference here. - app.mm = module.NewManager( - genutil.NewAppModule( - app.AccountKeeper, - app.StakingKeeper, - app.BaseApp.DeliverTx, - encodingConfig.TxConfig, - ), - auth.NewAppModule(appCodec, app.AccountKeeper, nil), - vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, *app.StakingKeeper), - budget.NewAppModule(appCodec, app.BudgetKeeper, app.AccountKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, *app.StakingKeeper), - staking.NewAppModule(appCodec, *app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - upgrade.NewAppModule(app.UpgradeKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - ibc.NewAppModule(app.IBCKeeper), - params.NewAppModule(app.ParamsKeeper), - liquidity.NewAppModule(appCodec, app.LiquidityKeeper, app.AccountKeeper, app.BankKeeper), - farming.NewAppModule(appCodec, app.FarmingKeeper, app.AccountKeeper, app.BankKeeper), - liquidstaking.NewAppModule(appCodec, app.LiquidStakingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GovKeeper), - liquidfarming.NewAppModule(appCodec, app.LiquidFarmingKeeper, app.AccountKeeper, app.BankKeeper), - claim.NewAppModule(appCodec, app.ClaimKeeper, app.AccountKeeper, app.BankKeeper, app.DistrKeeper, app.GovKeeper, app.LiquidityKeeper, app.LiquidStakingKeeper), - marketmaker.NewAppModule(appCodec, app.MarketMakerKeeper, app.AccountKeeper, app.BankKeeper), - lpfarm.NewAppModule(appCodec, app.LPFarmKeeper, app.AccountKeeper, app.BankKeeper, app.LiquidityKeeper), - app.transferModule, - ) - - // During begin block slashing happens after distr.BeginBlocker so that - // there is nothing left over in the validator fee pool, so as to keep the - // CanWithdrawInvariant invariant. - // NOTE: staking module is required if HistoricalEntries param > 0 - app.mm.SetOrderBeginBlockers( - upgradetypes.ModuleName, - capabilitytypes.ModuleName, - minttypes.ModuleName, - budgettypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - evidencetypes.ModuleName, - stakingtypes.ModuleName, - liquidstakingtypes.ModuleName, - liquiditytypes.ModuleName, - liquidfarmingtypes.ModuleName, - ibchost.ModuleName, - lpfarmtypes.ModuleName, - - // empty logic modules - authtypes.ModuleName, - banktypes.ModuleName, - govtypes.ModuleName, - crisistypes.ModuleName, - genutiltypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - paramstypes.ModuleName, - vestingtypes.ModuleName, - ibctransfertypes.ModuleName, - farmingtypes.ModuleName, - claimtypes.ModuleName, - marketmakertypes.ModuleName, - ) - app.mm.SetOrderEndBlockers( - // EndBlocker of crisis module called AssertInvariants - crisistypes.ModuleName, - govtypes.ModuleName, - stakingtypes.ModuleName, - liquiditytypes.ModuleName, - farmingtypes.ModuleName, - liquidstakingtypes.ModuleName, - liquidfarmingtypes.ModuleName, - - // empty logic modules - capabilitytypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - minttypes.ModuleName, - genutiltypes.ModuleName, - evidencetypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - paramstypes.ModuleName, - upgradetypes.ModuleName, - vestingtypes.ModuleName, - ibchost.ModuleName, - ibctransfertypes.ModuleName, - claimtypes.ModuleName, - budgettypes.ModuleName, - marketmakertypes.ModuleName, - lpfarmtypes.ModuleName, - ) - - // NOTE: The genutils module must occur after staking so that pools are - // properly initialized with tokens from genesis accounts. - // NOTE: Capability module must occur first so that it can initialize any capabilities - // so that other modules that want to create or claim capabilities afterwards in InitChain - // can do so safely. - app.mm.SetOrderInitGenesis( - capabilitytypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - stakingtypes.ModuleName, - slashingtypes.ModuleName, - govtypes.ModuleName, - minttypes.ModuleName, - ibchost.ModuleName, - genutiltypes.ModuleName, - evidencetypes.ModuleName, - ibctransfertypes.ModuleName, - feegrant.ModuleName, - authz.ModuleName, - budgettypes.ModuleName, - farmingtypes.ModuleName, - liquiditytypes.ModuleName, - liquidstakingtypes.ModuleName, - liquidfarmingtypes.ModuleName, - claimtypes.ModuleName, - marketmakertypes.ModuleName, - lpfarmtypes.ModuleName, - - // empty logic modules - paramstypes.ModuleName, - upgradetypes.ModuleName, - vestingtypes.ModuleName, - - // InitGenesis of crisis module called AssertInvariants - crisistypes.ModuleName, - ) - - app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) - - app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - app.mm.RegisterServices(app.configurator) - - // create the simulation manager and define the order of the modules for deterministic simulations - // - // NOTE: this is not required apps that don't use the simulator for fuzz testing - // transactions - app.sm = module.NewSimulationManager( - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - // Temporarily disable x/authz simulation - // 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), - budget.NewAppModule(appCodec, app.BudgetKeeper, app.AccountKeeper, app.BankKeeper), - farming.NewAppModule(appCodec, app.FarmingKeeper, app.AccountKeeper, app.BankKeeper), - staking.NewAppModule(appCodec, *app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, *app.StakingKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, *app.StakingKeeper), - params.NewAppModule(app.ParamsKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - liquidity.NewAppModule(appCodec, app.LiquidityKeeper, app.AccountKeeper, app.BankKeeper), - liquidstaking.NewAppModule(appCodec, app.LiquidStakingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GovKeeper), - claim.NewAppModule(appCodec, app.ClaimKeeper, app.AccountKeeper, app.BankKeeper, app.DistrKeeper, app.GovKeeper, app.LiquidityKeeper, app.LiquidStakingKeeper), - liquidfarming.NewAppModule(appCodec, app.LiquidFarmingKeeper, app.AccountKeeper, app.BankKeeper), - marketmaker.NewAppModule(appCodec, app.MarketMakerKeeper, app.AccountKeeper, app.BankKeeper), - lpfarm.NewAppModule(appCodec, app.LPFarmKeeper, app.AccountKeeper, app.BankKeeper, app.LiquidityKeeper), - ibc.NewAppModule(app.IBCKeeper), - app.transferModule, - ) - - app.sm.RegisterStoreDecoders() - - // initialize stores - app.MountKVStores(keys) - app.MountTransientStores(tkeys) - app.MountMemoryStores(memKeys) - - anteHandler, err := NewAnteHandler( - HandlerOptions{ - HandlerOptions: ante.HandlerOptions{ - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - FeegrantKeeper: app.FeeGrantKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - }, - IBCChannelkeeper: app.IBCKeeper.ChannelKeeper, - }, - ) - if err != nil { - panic(errors.Errorf("failed to create AnteHandler: %s", err)) - } - - app.SetAnteHandler(anteHandler) - app.SetInitChainer(app.InitChainer) - app.SetBeginBlocker(app.BeginBlocker) - app.SetEndBlocker(app.EndBlocker) - - app.SetUpgradeStoreLoaders() - app.SetUpgradeHandlers(app.mm, app.configurator) - - if loadLatest { - if err := app.LoadLatestVersion(); err != nil { - tmos.Exit(fmt.Sprintf("failed to load latest version: %s", err)) - } - } - - app.ScopedIBCKeeper = scopedIBCKeeper - app.ScopedTransferKeeper = scopedTransferKeeper - - return app -} - -// Name returns the name of the App. -func (app *App) Name() string { return app.BaseApp.Name() } - -// BeginBlocker application updates every begin block. -func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - return app.mm.BeginBlock(ctx, req) -} - -// EndBlocker application updates every end block. -func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.mm.EndBlock(ctx, req) -} - -// InitChainer application update at chain initialization. -func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { - var genesisState GenesisState - if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { - panic(err) - } - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) -} - -// LoadHeight loads a particular height. -func (app *App) LoadHeight(height int64) error { - return app.LoadVersion(height) -} - -// ModuleAccountAddrs returns all the app's module account addresses. -func (app *App) ModuleAccountAddrs() map[string]bool { - modAccAddrs := make(map[string]bool) - for acc := range maccPerms { - modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true - } - - // add farming rewards reserve account - modAccAddrs[farmingtypes.RewardsReserveAcc.String()] = true - - return modAccAddrs -} - -// LegacyAmino returns App's amino codec. -// -// 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 *App) LegacyAmino() *codec.LegacyAmino { - return app.legacyAmino -} - -// AppCodec returns App's app codec. -// -// 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 *App) AppCodec() codec.Codec { - return app.appCodec -} - -// InterfaceRegistry returns App's InterfaceRegistry -func (app *App) InterfaceRegistry() types.InterfaceRegistry { - return app.interfaceRegistry -} - -// GetKey returns the KVStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *App) GetKey(storeKey string) *sdk.KVStoreKey { - return app.keys[storeKey] -} - -// GetTKey returns the TransientStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *App) GetTKey(storeKey string) *sdk.TransientStoreKey { - return app.tkeys[storeKey] -} - -// GetMemKey returns the MemStoreKey for the provided mem key. -// -// NOTE: This is solely used for testing purposes. -func (app *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey { - return app.memKeys[storeKey] -} - -// GetSubspace returns a param subspace for a given module name. -// -// NOTE: This is solely to be used for testing purposes. -func (app *App) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// SimulationManager implements the SimulationApp interface -func (app *App) SimulationManager() *module.SimulationManager { - return app.sm -} - -// RegisterAPIRoutes registers all application module routes with the provided -// API server. -func (app *App) 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 - if apiConfig.Swagger { - RegisterSwaggerAPI(apiSvr.Router) - } -} - -// RegisterTxService implements the Application.RegisterTxService method. -func (app *App) RegisterTxService(clientCtx client.Context) { - authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) -} - -// RegisterTendermintService implements the Application.RegisterTendermintService method. -func (app *App) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry) -} - -// RegisterSwaggerAPI registers swagger route with API Server -func RegisterSwaggerAPI(rtr *mux.Router) { - statikFS, err := fs.New() - if err != nil { - panic(err) - } - - staticServer := http.FileServer(statikFS) - rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer)) -} - -// initParamsKeeper init params keeper and its subspaces -func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper { - paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) - - paramsKeeper.Subspace(authtypes.ModuleName) - paramsKeeper.Subspace(banktypes.ModuleName) - paramsKeeper.Subspace(stakingtypes.ModuleName) - paramsKeeper.Subspace(minttypes.ModuleName) - paramsKeeper.Subspace(distrtypes.ModuleName) - paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()) - paramsKeeper.Subspace(crisistypes.ModuleName) - paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(ibchost.ModuleName) - paramsKeeper.Subspace(budgettypes.ModuleName) - paramsKeeper.Subspace(farmingtypes.ModuleName) - paramsKeeper.Subspace(liquiditytypes.ModuleName) - paramsKeeper.Subspace(liquidstakingtypes.ModuleName) - paramsKeeper.Subspace(liquidfarmingtypes.ModuleName) - paramsKeeper.Subspace(marketmakertypes.ModuleName) - paramsKeeper.Subspace(lpfarmtypes.ModuleName) - - return paramsKeeper -} - -func (app *App) SetUpgradeStoreLoaders() { - // common logics for set upgrades - upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() - if err != nil { - panic(fmt.Sprintf("failed to read upgrade info from disk %s", err)) - } - - // testnet upgrade state loaders - if upgradeInfo.Name == rc4.UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - // configure store loader that checks if version == upgradeHeight and applies store upgrades - app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &rc4.StoreUpgrades)) - } - // mainnet upgrade state loaders - if upgradeInfo.Name == v2_0_0.UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - // configure store loader that checks if version == upgradeHeight and applies store upgrades - app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &v2_0_0.StoreUpgrades)) - } - - if upgradeInfo.Name == v3.UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - // configure store loader that checks if version == upgradeHeight and applies store upgrades - app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &v3.StoreUpgrades)) - } -} - -func (app *App) SetUpgradeHandlers(mm *module.Manager, configurator module.Configurator) { - // testnet upgrade handlers - app.UpgradeKeeper.SetUpgradeHandler( - rc4.UpgradeName, rc4.UpgradeHandler) - - // mainnet upgrade handlers - app.UpgradeKeeper.SetUpgradeHandler( - v2_0_0.UpgradeName, v2_0_0.UpgradeHandler(mm, configurator, app.MintKeeper, app.BudgetKeeper, app.LiquidityKeeper)) - - app.UpgradeKeeper.SetUpgradeHandler( - v3.UpgradeName, v3.UpgradeHandler( - mm, configurator, app.MarketMakerKeeper, app.LiquidityKeeper, app.LPFarmKeeper, app.FarmingKeeper, app.BankKeeper)) -} - -func (App) TxConfig() client.TxConfig { return nil } -func (App) AutoCliOpts() autocli.AppOptions { return autocli.AppOptions{} } - -// GetKey returns the KVStoreKey for the provided store key. -func (App) GetKey(storeKey string) *storetypes.KVStoreKey { - sk := app.UnsafeFindStoreKey(storeKey) - kvStoreKey, ok := sk.(*storetypes.KVStoreKey) - if !ok { - return nil - } - return kvStoreKey -} - -// GetMemKey returns the MemoryStoreKey for the provided store key. -func (App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { - key, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.MemoryStoreKey) - if !ok { - return nil - } - - return key -} - -// kvStoreKeys returns all the kv store keys registered inside App. -func (App) kvStoreKeys() map[string]*storetypes.KVStoreKey { - keys := make(map[string]*storetypes.KVStoreKey) - for _, k := range app.GetStoreKeys() { - if kv, ok := k.(*storetypes.KVStoreKey); ok { - keys[kv.Name()] = kv - } - } - - return keys -} - -// GetSubspace returns a param subspace for a given module name. -func (App) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// SimulationManager implements the SimulationApp interface -func (App) SimulationManager() *module.SimulationManager { - return app.sm -} diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/crescent/go.mod b/ignite/pkg/cosmosanalysis/app/testdata/modules/crescent/go.mod deleted file mode 100644 index d0b47f88a3..0000000000 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/crescent/go.mod +++ /dev/null @@ -1,29 +0,0 @@ -module github.com/crescent-network/crescent/v5 - -go 1.18 - -require ( - github.com/cosmos/cosmos-sdk v0.45.10 - github.com/cosmos/ibc-go/v3 v3.4.0 - github.com/gogo/protobuf v1.3.3 - github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.2 - github.com/golangci/golangci-lint v1.50.1 - github.com/gorilla/mux v1.8.0 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0 - github.com/rakyll/statik v0.1.7 - github.com/regen-network/cosmos-proto v0.3.1 - github.com/spf13/cast v1.5.0 - github.com/spf13/cobra v1.6.0 - github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.0 - github.com/tendermint/tendermint v0.34.22 - github.com/tendermint/tm-db v0.6.7 - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e - google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c - google.golang.org/grpc v1.50.1 - google.golang.org/protobuf v1.28.1 - gopkg.in/yaml.v2 v2.4.0 -) - diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/gaia/app.go b/ignite/pkg/cosmosanalysis/app/testdata/modules/gaia/app.go deleted file mode 100644 index daa505eea0..0000000000 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/gaia/app.go +++ /dev/null @@ -1,1098 +0,0 @@ -package gaia - -import ( - "fmt" - "io" - stdlog "log" - "net/http" - "os" - "path/filepath" - - "cosmossdk.io/client/v2/autocli" - sdkerrors "cosmossdk.io/errors" - "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/codec" - "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/server/api" - "github.com/cosmos/cosmos-sdk/server/config" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/store/streaming" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/cosmos/cosmos-sdk/x/auth/ante" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/auth/vesting" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/cosmos/cosmos-sdk/x/authz" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" - "github.com/cosmos/cosmos-sdk/x/bank" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/cosmos-sdk/x/crisis" - crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "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/group" - groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" - groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" - "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" - "github.com/cosmos/cosmos-sdk/x/params" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/cosmos/cosmos-sdk/x/slashing" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - "github.com/cosmos/cosmos-sdk/x/staking" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - 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/v5/modules/apps/27-interchain-accounts" - icacontroller "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller" - icacontrollerkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" - "github.com/cosmos/ibc-go/v5/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v5/modules/core" - ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v5/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - ibcchanneltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" - ibctestingtypes "github.com/cosmos/ibc-go/v5/testing/types" - "github.com/gorilla/mux" - "github.com/gravity-devs/liquidity/v2/x/liquidity" - liquiditykeeper "github.com/gravity-devs/liquidity/v2/x/liquidity/keeper" - liquiditytypes "github.com/gravity-devs/liquidity/v2/x/liquidity/types" - "github.com/rakyll/statik/fs" - "github.com/spf13/cast" - "github.com/strangelove-ventures/packet-forward-middleware/v2/router" - routerkeeper "github.com/strangelove-ventures/packet-forward-middleware/v2/router/keeper" - routertypes "github.com/strangelove-ventures/packet-forward-middleware/v2/router/types" - abci "github.com/tendermint/tendermint/abci/types" - tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - dbm "github.com/tendermint/tm-db" - - "github.com/ignite/cli/v29/ignite/pkg/errors" - - gaiaante "github.com/cosmos/gaia/v8/ante" - gaiaappparams "github.com/cosmos/gaia/v8/app/params" - "github.com/cosmos/gaia/v8/x/globalfee" - "github.com/cosmos/gaia/v8/x/icamauth" - icamauthkeeper "github.com/cosmos/gaia/v8/x/icamauth/keeper" - icamauthtypes "github.com/cosmos/gaia/v8/x/icamauth/types" - - // unnamed import of statik for swagger UI support - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" -) - -var ( - // DefaultNodeHome default home directories for the application daemon - DefaultNodeHome string - - // ModuleBasics defines the module BasicManager is in charge of setting up basic, - // non-dependant module elements, such as codec registration - // and genesis verification. - ModuleBasics = module.NewBasicManager( - auth.AppModuleBasic{}, - genutil.AppModuleBasic{}, - bank.AppModuleBasic{}, - capability.AppModuleBasic{}, - staking.AppModuleBasic{}, - mint.AppModuleBasic{}, - distr.AppModuleBasic{}, - gov.NewAppModuleBasic( - []govclient.ProposalHandler{ - paramsclient.ProposalHandler, - distrclient.ProposalHandler, - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, - ibcclientclient.UpgradeProposalHandler, - }, - ), - params.AppModuleBasic{}, - crisis.AppModuleBasic{}, - slashing.AppModuleBasic{}, - feegrantmodule.AppModuleBasic{}, - authzmodule.AppModuleBasic{}, - groupmodule.AppModuleBasic{}, - ibc.AppModuleBasic{}, - upgrade.AppModuleBasic{}, - evidence.AppModuleBasic{}, - transfer.AppModuleBasic{}, - vesting.AppModuleBasic{}, - liquidity.AppModuleBasic{}, - router.AppModuleBasic{}, - ica.AppModuleBasic{}, - icamauth.AppModuleBasic{}, - globalfee.AppModule{}, - ) - - // module account permissions - maccPerms = map[string][]string{ - authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, - icatypes.ModuleName: nil, - minttypes.ModuleName: {authtypes.Minter}, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - govtypes.ModuleName: {authtypes.Burner}, - liquiditytypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - } -) - -var ( - _ simapp.App = (*GaiaApp)(nil) - _ servertypes.Application = (*GaiaApp)(nil) -) - -// GaiaApp extends an ABCI application, but with most of its parameters exported. -// They are exported for convenience in creating helper functions, as object -// capabilities aren't needed for testing. -type GaiaApp struct { //nolint: revive - *baseapp.BaseApp - legacyAmino *codec.LegacyAmino - appCodec codec.Codec - interfaceRegistry types.InterfaceRegistry - invCheckPeriod uint - - // keys to access the substores - keys map[string]*storetypes.KVStoreKey - tkeys map[string]*storetypes.TransientStoreKey - memKeys map[string]*storetypes.MemoryStoreKey - - // keepers - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - IBCKeeper *ibckeeper.Keeper - ICAControllerKeeper icacontrollerkeeper.Keeper - ICAHostKeeper icahostkeeper.Keeper - ICAMauthKeeper icamauthkeeper.Keeper - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper - GroupKeeper groupkeeper.Keeper - AuthzKeeper authzkeeper.Keeper - LiquidityKeeper liquiditykeeper.Keeper - - RouterKeeper routerkeeper.Keeper - - // make scoped keepers public for test purposes - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedTransferKeeper capabilitykeeper.ScopedKeeper - ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper - ScopedICAHostKeeper capabilitykeeper.ScopedKeeper - ScopedICAMauthKeeper capabilitykeeper.ScopedKeeper - - // the module manager - mm *module.Manager - - // simulation manager - sm *module.SimulationManager - configurator module.Configurator -} - -func init() { - userHomeDir, err := os.UserHomeDir() - if err != nil { - stdlog.Println("Failed to get home dir %2", err) - } - - DefaultNodeHome = filepath.Join(userHomeDir, ".gaia") -} - -// NewGaiaApp returns a reference to an initialized Gaia. -func NewGaiaApp( - logger log.Logger, - db dbm.DB, traceStore io.Writer, - loadLatest bool, - skipUpgradeHeights map[int64]bool, - homePath string, - invCheckPeriod uint, - encodingConfig gaiaappparams.EncodingConfig, - appOpts servertypes.AppOptions, - baseAppOptions ...func(*baseapp.BaseApp), -) *GaiaApp { - appCodec := encodingConfig.Codec - legacyAmino := encodingConfig.Amino - interfaceRegistry := encodingConfig.InterfaceRegistry - - bApp := baseapp.NewBaseApp( - appName, - logger, - db, - encodingConfig.TxConfig.TxDecoder(), - baseAppOptions...) - bApp.SetCommitMultiStoreTracer(traceStore) - bApp.SetVersion(version.Version) - bApp.SetInterfaceRegistry(interfaceRegistry) - - keys := sdk.NewKVStoreKeys( - authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, - minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, - govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, - evidencetypes.StoreKey, liquiditytypes.StoreKey, ibctransfertypes.StoreKey, - capabilitytypes.StoreKey, feegrant.StoreKey, authzkeeper.StoreKey, routertypes.StoreKey, icacontrollertypes.StoreKey, icahosttypes.StoreKey, icamauthtypes.StoreKey, group.StoreKey, - ) - tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) - memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) - - // configure state listening capabilities using AppOptions - // we are doing nothing with the returned streamingServices and waitGroup in this case - if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, keys); err != nil { - tmos.Exit(err.Error()) - } - - app := &GaiaApp{ - BaseApp: bApp, - legacyAmino: legacyAmino, - appCodec: appCodec, - interfaceRegistry: interfaceRegistry, - invCheckPeriod: invCheckPeriod, - keys: keys, - tkeys: tkeys, - memKeys: memKeys, - } - - app.ParamsKeeper = initParamsKeeper( - appCodec, - legacyAmino, - keys[paramstypes.StoreKey], - tkeys[paramstypes.TStoreKey], - ) - - // set the BaseApp's parameter store - bApp.SetParamStore( - app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()), - ) - - // add capability keeper and ScopeToModule for ibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) - scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - scopedICAMauthKeeper := app.CapabilityKeeper.ScopeToModule(icamauthtypes.ModuleName) - scopedICAControllerKeeper := app.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName) - scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) - - app.CapabilityKeeper.Seal() - - // add keepers - app.AccountKeeper = authkeeper.NewAccountKeeper( - appCodec, - keys[authtypes.StoreKey], - app.GetSubspace(authtypes.ModuleName), - authtypes.ProtoBaseAccount, - maccPerms, - sdk.Bech32MainPrefix, - ) - app.BankKeeper = bankkeeper.NewBaseKeeper( - appCodec, - keys[banktypes.StoreKey], - app.AccountKeeper, - app.GetSubspace(banktypes.ModuleName), - app.BlockedModuleAccountAddrs(), - ) - - app.AuthzKeeper = authzkeeper.NewKeeper( - keys[authzkeeper.StoreKey], - appCodec, - app.MsgServiceRouter(), - app.AccountKeeper, - ) - - groupConfig := group.DefaultConfig() - /* - Example of setting group params: - groupConfig.MaxMetadataLen = 1000 - */ - app.GroupKeeper = groupkeeper.NewKeeper( - keys[group.StoreKey], - appCodec, - app.MsgServiceRouter(), - app.AccountKeeper, - groupConfig, - ) - - app.FeeGrantKeeper = feegrantkeeper.NewKeeper( - appCodec, - keys[feegrant.StoreKey], - app.AccountKeeper, - ) - stakingKeeper := stakingkeeper.NewKeeper( - appCodec, - keys[stakingtypes.StoreKey], - app.AccountKeeper, - app.BankKeeper, - app.GetSubspace(stakingtypes.ModuleName), - ) - app.MintKeeper = mintkeeper.NewKeeper( - appCodec, - keys[minttypes.StoreKey], - app.GetSubspace(minttypes.ModuleName), - &stakingKeeper, - app.AccountKeeper, - app.BankKeeper, - authtypes.FeeCollectorName, - ) - app.DistrKeeper = distrkeeper.NewKeeper( - appCodec, - keys[distrtypes.StoreKey], - app.GetSubspace(distrtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - &stakingKeeper, - authtypes.FeeCollectorName, - ) - app.SlashingKeeper = slashingkeeper.NewKeeper( - appCodec, - keys[slashingtypes.StoreKey], - &stakingKeeper, - app.GetSubspace(slashingtypes.ModuleName), - ) - app.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), - invCheckPeriod, - app.BankKeeper, - authtypes.FeeCollectorName, - ) - app.LiquidityKeeper = liquiditykeeper.NewKeeper( - appCodec, - keys[liquiditytypes.StoreKey], - app.GetSubspace(liquiditytypes.ModuleName), - app.BankKeeper, - app.AccountKeeper, - app.DistrKeeper, - ) - - // register the staking hooks - // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper = *stakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), - ) - - // set the governance module account as the authority for conducting upgrades - // UpgradeKeeper must be created before IBCKeeper - app.UpgradeKeeper = upgradekeeper.NewKeeper( - skipUpgradeHeights, - keys[upgradetypes.StoreKey], - appCodec, - homePath, - app.BaseApp, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - - // UpgradeKeeper must be created before IBCKeeper - app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, - keys[ibchost.StoreKey], - app.GetSubspace(ibchost.ModuleName), - app.StakingKeeper, - app.UpgradeKeeper, - scopedIBCKeeper, - ) - - // register the proposal types - - 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)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) - govConfig := govtypes.DefaultConfig() - /* - Example of setting gov params: - govConfig.MaxMetadataLen = 10000 - */ - app.GovKeeper = govkeeper.NewKeeper( - appCodec, - keys[govtypes.StoreKey], - app.GetSubspace(govtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.StakingKeeper, - govRouter, - app.MsgServiceRouter(), - govConfig, - ) - - app.TransferKeeper = ibctransferkeeper.NewKeeper( - appCodec, - keys[ibctransfertypes.StoreKey], - app.GetSubspace(ibctransfertypes.ModuleName), - app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - app.AccountKeeper, - app.BankKeeper, - scopedTransferKeeper, - ) - transferModule := transfer.NewAppModule(app.TransferKeeper) - transferIBCModule := transfer.NewIBCModule(app.TransferKeeper) - - app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper( - appCodec, keys[icacontrollertypes.StoreKey], app.GetSubspace(icacontrollertypes.SubModuleName), - app.IBCKeeper.ChannelKeeper, // may be replaced with middleware such as ics29 fee - app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, - scopedICAControllerKeeper, app.MsgServiceRouter(), - ) - - app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, keys[icahosttypes.StoreKey], - app.GetSubspace(icahosttypes.SubModuleName), - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - app.AccountKeeper, - scopedICAHostKeeper, - app.MsgServiceRouter(), - ) - icaModule := ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper) - - app.ICAMauthKeeper = icamauthkeeper.NewKeeper( - appCodec, - keys[icamauthtypes.StoreKey], - app.ICAControllerKeeper, - scopedICAMauthKeeper, - ) - icaMauthModule := icamauth.NewAppModule(appCodec, app.ICAMauthKeeper) - icaMauthIBCModule := icamauth.NewIBCModule(app.ICAMauthKeeper) - - icaControllerIBCModule := icacontroller.NewIBCMiddleware(icaMauthIBCModule, app.ICAControllerKeeper) - icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) - app.RouterKeeper = routerkeeper.NewKeeper(appCodec, keys[routertypes.StoreKey], app.GetSubspace(routertypes.ModuleName), app.TransferKeeper, app.DistrKeeper) - - routerModule := router.NewAppModule(app.RouterKeeper, transferIBCModule) - // create static IBC router, add transfer route, then set and seal it - ibcRouter := porttypes.NewRouter() - ibcRouter.AddRoute(icacontrollertypes.SubModuleName, icaControllerIBCModule). - AddRoute(icahosttypes.SubModuleName, icaHostIBCModule). - AddRoute(ibctransfertypes.ModuleName, transferIBCModule). - AddRoute(icamauthtypes.ModuleName, icaControllerIBCModule) - app.IBCKeeper.SetRouter(ibcRouter) - - // create evidence keeper with router - evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, - keys[evidencetypes.StoreKey], - &app.StakingKeeper, - app.SlashingKeeper, - ) - - app.EvidenceKeeper = *evidenceKeeper - - skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) - - // NOTE: Any module instantiated in the module manager that is later modified - // must be passed by reference here. - app.mm = module.NewManager( - genutil.NewAppModule( - app.AccountKeeper, - app.StakingKeeper, - app.BaseApp.DeliverTx, - encodingConfig.TxConfig, - ), - auth.NewAppModule(appCodec, app.AccountKeeper, nil), - vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - 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), - upgrade.NewAppModule(app.UpgradeKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - ibc.NewAppModule(app.IBCKeeper), - params.NewAppModule(app.ParamsKeeper), - liquidity.NewAppModule(appCodec, app.LiquidityKeeper, app.AccountKeeper, app.BankKeeper, app.DistrKeeper), - globalfee.NewAppModule(app.GetSubspace(globalfee.ModuleName)), - transferModule, - icaModule, - icaMauthModule, - routerModule, - routerModule, - ) - - // During begin block slashing happens after distr.BeginBlocker so that - // there is nothing left over in the validator fee pool, so as to keep the - // CanWithdrawInvariant invariant. - // NOTE: staking module is required if HistoricalEntries param > 0 - // NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC) - app.mm.SetOrderBeginBlockers( - // upgrades should be run first - upgradetypes.ModuleName, - capabilitytypes.ModuleName, - minttypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - evidencetypes.ModuleName, - stakingtypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - govtypes.ModuleName, - crisistypes.ModuleName, - liquiditytypes.ModuleName, - ibctransfertypes.ModuleName, - ibchost.ModuleName, - icatypes.ModuleName, - routertypes.ModuleName, - genutiltypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - group.ModuleName, - paramstypes.ModuleName, - vestingtypes.ModuleName, - icatypes.ModuleName, - icamauthtypes.ModuleName, - globalfee.ModuleName, - ) - app.mm.SetOrderEndBlockers( - crisistypes.ModuleName, - govtypes.ModuleName, - stakingtypes.ModuleName, - liquiditytypes.ModuleName, - ibctransfertypes.ModuleName, - ibchost.ModuleName, - icatypes.ModuleName, - routertypes.ModuleName, - capabilitytypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - minttypes.ModuleName, - genutiltypes.ModuleName, - evidencetypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - group.ModuleName, - paramstypes.ModuleName, - upgradetypes.ModuleName, - vestingtypes.ModuleName, - icatypes.ModuleName, - icamauthtypes.ModuleName, - globalfee.ModuleName, - ) - - // NOTE: The genutils module must occur after staking so that pools are - // properly initialized with tokens from genesis accounts. - // NOTE: The genutils module must also occur after auth so that it can access the params from auth. - // NOTE: Capability module must occur first so that it can initialize any capabilities - // so that other modules that want to create or claim capabilities afterwards in InitChain - // can do so safely. - app.mm.SetOrderInitGenesis( - capabilitytypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - stakingtypes.ModuleName, - slashingtypes.ModuleName, - govtypes.ModuleName, - minttypes.ModuleName, - crisistypes.ModuleName, - genutiltypes.ModuleName, - ibctransfertypes.ModuleName, - ibchost.ModuleName, - icatypes.ModuleName, - evidencetypes.ModuleName, - liquiditytypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - group.ModuleName, - routertypes.ModuleName, - icatypes.ModuleName, - icamauthtypes.ModuleName, - paramstypes.ModuleName, - upgradetypes.ModuleName, - vestingtypes.ModuleName, - globalfee.ModuleName, - ) - - // Uncomment if you want to set a custom migration order here. - // app.mm.SetOrderMigrations(custom order) - - app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) - - app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - app.mm.RegisterServices(app.configurator) - - // create the simulation manager and define the order of the modules for deterministic simulations - // - // NOTE: this is not required apps that don't use the simulator for fuzz testing - // transactions - app.sm = module.NewSimulationManager( - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - params.NewAppModule(app.ParamsKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - liquidity.NewAppModule(appCodec, app.LiquidityKeeper, app.AccountKeeper, app.BankKeeper, app.DistrKeeper), - ibc.NewAppModule(app.IBCKeeper), - transferModule, - ) - - app.sm.RegisterStoreDecoders() - - // initialize stores - app.MountKVStores(keys) - app.MountTransientStores(tkeys) - app.MountMemoryStores(memKeys) - - bypassMinFeeMsgTypes := cast.ToStringSlice(appOpts.Get(gaiaappparams.BypassMinFeeMsgTypesKey)) - if bypassMinFeeMsgTypes == nil { - bypassMinFeeMsgTypes = GetDefaultBypassFeeMessages() - } - - anteHandler, err := gaiaante.NewAnteHandler( - gaiaante.HandlerOptions{ - HandlerOptions: ante.HandlerOptions{ - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - FeegrantKeeper: app.FeeGrantKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - // TxFeeChecker is not the default fee check, it will not check if the fee meets min_gas_price, this is checked in NewFeeWithBypassDecorator already. - TxFeeChecker: func(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error) { - feeTx, ok := tx.(sdk.FeeTx) - if !ok { - return nil, 0, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") - } - - feeCoins := feeTx.GetFee() - priority := gaiaante.GetTxPriority(feeCoins) - - return feeCoins, priority, nil - }, - }, - IBCkeeper: app.IBCKeeper, - BypassMinFeeMsgTypes: bypassMinFeeMsgTypes, - GlobalFeeSubspace: app.GetSubspace(globalfee.ModuleName), - }, - ) - if err != nil { - panic(errors.Errorf("failed to create AnteHandler: %w", err)) - } - - app.SetAnteHandler(anteHandler) - app.SetInitChainer(app.InitChainer) - app.SetBeginBlocker(app.BeginBlocker) - app.SetEndBlocker(app.EndBlocker) - - app.UpgradeKeeper.SetUpgradeHandler( - upgradeName, - func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - fromVM[icatypes.ModuleName] = icaModule.ConsensusVersion() - // create ICS27 Controller submodule params - controllerParams := icacontrollertypes.Params{} - // create ICS27 Host submodule params - hostParams := icahosttypes.Params{ - HostEnabled: true, - AllowMessages: []string{ - authzMsgExec, - authzMsgGrant, - authzMsgRevoke, - bankMsgSend, - bankMsgMultiSend, - distrMsgSetWithdrawAddr, - distrMsgWithdrawValidatorCommission, - distrMsgFundCommunityPool, - distrMsgWithdrawDelegatorReward, - feegrantMsgGrantAllowance, - feegrantMsgRevokeAllowance, - govMsgVoteWeighted, - govMsgSubmitProposal, - govMsgDeposit, - govMsgVote, - stakingMsgEditValidator, - stakingMsgDelegate, - stakingMsgUndelegate, - stakingMsgBeginRedelegate, - stakingMsgCreateValidator, - vestingMsgCreateVestingAccount, - ibcMsgTransfer, - liquidityMsgCreatePool, - liquidityMsgSwapWithinBatch, - liquidityMsgDepositWithinBatch, - liquidityMsgWithdrawWithinBatch, - }, - } - - ctx.Logger().Info("start to init interchainaccount module...") - // initialize ICS27 module - icaModule.InitModule(ctx, controllerParams, hostParams) - ctx.Logger().Info("Start to run module migrations...") - - return app.mm.RunMigrations(ctx, app.configurator, fromVM) - }, - ) - - upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() - if err != nil { - panic(fmt.Sprintf("failed to read upgrade info from disk %s", err)) - } - - if upgradeInfo.Name == upgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - storeUpgrades := storetypes.StoreUpgrades{ - Added: []string{icahosttypes.StoreKey}, - } - - // configure store loader that checks if version == upgradeHeight and applies store upgrades - app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) - } - - if loadLatest { - if err := app.LoadLatestVersion(); err != nil { - tmos.Exit(fmt.Sprintf("failed to load latest version: %s", err)) - } - } - - app.ScopedIBCKeeper = scopedIBCKeeper - app.ScopedTransferKeeper = scopedTransferKeeper - app.ScopedICAControllerKeeper = scopedICAControllerKeeper - app.ScopedICAHostKeeper = scopedICAHostKeeper - app.ScopedICAMauthKeeper = scopedICAMauthKeeper - - return app -} - -func GetDefaultBypassFeeMessages() []string { - return []string{ - sdk.MsgTypeURL(&ibcchanneltypes.MsgRecvPacket{}), - sdk.MsgTypeURL(&ibcchanneltypes.MsgAcknowledgement{}), - sdk.MsgTypeURL(&ibcclienttypes.MsgUpdateClient{}), - } -} - -// Name returns the name of the App -func (app *GaiaApp) Name() string { return app.BaseApp.Name() } - -// BeginBlocker application updates every begin block -func (app *GaiaApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - return app.mm.BeginBlock(ctx, req) -} - -// EndBlocker application updates every end block -func (app *GaiaApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.mm.EndBlock(ctx, req) -} - -// InitChainer application update at chain initialization -func (app *GaiaApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { - var genesisState GenesisState - if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { - panic(err) - } - - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) - - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) -} - -// LoadHeight loads a particular height -func (app *GaiaApp) LoadHeight(height int64) error { - return app.LoadVersion(height) -} - -// ModuleAccountAddrs returns all the app's module account addresses. -func (app *GaiaApp) ModuleAccountAddrs() map[string]bool { - modAccAddrs := make(map[string]bool) - for acc := range maccPerms { - modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true - } - - return modAccAddrs -} - -// BlockedModuleAccountAddrs returns all the app's blocked module account -// addresses. -func (app *GaiaApp) BlockedModuleAccountAddrs() map[string]bool { - modAccAddrs := app.ModuleAccountAddrs() - - // remove module accounts that are ALLOWED to received funds - // - // TODO: Blocked on updating to v0.46.x - // delete(modAccAddrs, authtypes.NewModuleAddress(grouptypes.ModuleName).String()) - delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String()) - - return modAccAddrs -} - -// LegacyAmino returns GaiaApp's amino codec. -// -// 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 *GaiaApp) LegacyAmino() *codec.LegacyAmino { - return app.legacyAmino -} - -// AppCodec returns Gaia's app codec. -// -// 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 *GaiaApp) AppCodec() codec.Codec { - return app.appCodec -} - -// InterfaceRegistry returns Gaia's InterfaceRegistry -func (app *GaiaApp) InterfaceRegistry() types.InterfaceRegistry { - return app.interfaceRegistry -} - -// GetKey returns the KVStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *GaiaApp) GetKey(storeKey string) *storetypes.KVStoreKey { - return app.keys[storeKey] -} - -// GetTKey returns the TransientStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *GaiaApp) GetTKey(storeKey string) *storetypes.TransientStoreKey { - return app.tkeys[storeKey] -} - -// GetMemKey returns the MemStoreKey for the provided mem key. -// -// NOTE: This is solely used for testing purposes. -func (app *GaiaApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { - return app.memKeys[storeKey] -} - -// GetSubspace returns a param subspace for a given module name. -// -// NOTE: This is solely to be used for testing purposes. -func (app *GaiaApp) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// SimulationManager implements the SimulationApp interface -func (app *GaiaApp) SimulationManager() *module.SimulationManager { - return app.sm -} - -// RegisterAPIRoutes registers all application module routes with the provided -// API server. -func (app *GaiaApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { - clientCtx := apiSvr.ClientCtx - // 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.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - - // register swagger API from root so that other applications can override easily - if apiConfig.Swagger { - RegisterSwaggerAPI(apiSvr.Router) - } -} - -// RegisterTxService implements the Application.RegisterTxService method. -func (app *GaiaApp) RegisterTxService(clientCtx client.Context) { - authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) -} - -// RegisterTendermintService implements the Application.RegisterTendermintService method. -func (app *GaiaApp) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService( - clientCtx, - app.BaseApp.GRPCQueryRouter(), - app.interfaceRegistry, - app.Query, - ) -} - -// RegisterSwaggerAPI registers swagger route with API Server -func RegisterSwaggerAPI(rtr *mux.Router) { - statikFS, err := fs.New() - if err != nil { - panic(err) - } - - staticServer := http.FileServer(statikFS) - rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer)) -} - -// initParamsKeeper init params keeper and its subspaces -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) - paramsKeeper.Subspace(banktypes.ModuleName) - paramsKeeper.Subspace(stakingtypes.ModuleName) - paramsKeeper.Subspace(minttypes.ModuleName) - paramsKeeper.Subspace(distrtypes.ModuleName) - paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) - paramsKeeper.Subspace(crisistypes.ModuleName) - paramsKeeper.Subspace(liquiditytypes.ModuleName) - paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(ibchost.ModuleName) - - paramsKeeper.Subspace(routertypes.ModuleName).WithKeyTable(routertypes.ParamKeyTable()) - paramsKeeper.Subspace(icacontrollertypes.SubModuleName) - paramsKeeper.Subspace(icahosttypes.SubModuleName) - paramsKeeper.Subspace(globalfee.ModuleName) - - return paramsKeeper -} - -func (app *GaiaApp) OnTxSucceeded(ctx sdk.Context, sourcePort, sourceChannel string, txHash []byte, txBytes []byte) { -} - -func (app *GaiaApp) OnTxFailed(ctx sdk.Context, sourcePort, sourceChannel string, txHash []byte, txBytes []byte) { -} - -// TestingApp functions - -// GetBaseApp implements the TestingApp interface. -func (app *GaiaApp) GetBaseApp() *baseapp.BaseApp { - return app.BaseApp -} - -// GetStakingKeeper implements the TestingApp interface. -func (app *GaiaApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { - return app.StakingKeeper -} - -// GetIBCKeeper implements the TestingApp interface. -func (app *GaiaApp) GetIBCKeeper() *ibckeeper.Keeper { - return app.IBCKeeper -} - -// GetScopedIBCKeeper implements the TestingApp interface. -func (app *GaiaApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { - return app.ScopedIBCKeeper -} - -// GetTxConfig implements the TestingApp interface. -func (app *GaiaApp) GetTxConfig() client.TxConfig { - return MakeTestEncodingConfig().TxConfig -} - -func (GaiaApp) TxConfig() client.TxConfig { return nil } -func (GaiaApp) AutoCliOpts() autocli.AppOptions { return autocli.AppOptions{} } - -// EmptyAppOptions is a stub implementing AppOptions -type EmptyAppOptions struct{} - -// Get implements AppOptions -func (ao EmptyAppOptions) Get(o string) interface{} { - return nil -} - -// GetKey returns the KVStoreKey for the provided store key. -func (GaiaApp) GetKey(storeKey string) *storetypes.KVStoreKey { - sk := app.UnsafeFindStoreKey(storeKey) - kvStoreKey, ok := sk.(*storetypes.KVStoreKey) - if !ok { - return nil - } - return kvStoreKey -} - -// GetMemKey returns the MemoryStoreKey for the provided store key. -func (GaiaApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { - key, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.MemoryStoreKey) - if !ok { - return nil - } - - return key -} - -// kvStoreKeys returns all the kv store keys registered inside App. -func (GaiaApp) kvStoreKeys() map[string]*storetypes.KVStoreKey { - keys := make(map[string]*storetypes.KVStoreKey) - for _, k := range app.GetStoreKeys() { - if kv, ok := k.(*storetypes.KVStoreKey); ok { - keys[kv.Name()] = kv - } - } - - return keys -} - -// GetSubspace returns a param subspace for a given module name. -func (GaiaApp) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// SimulationManager implements the SimulationApp interface -func (GaiaApp) SimulationManager() *module.SimulationManager { - return app.sm -} diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/gaia/go.mod b/ignite/pkg/cosmosanalysis/app/testdata/modules/gaia/go.mod deleted file mode 100644 index 0851601f21..0000000000 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/gaia/go.mod +++ /dev/null @@ -1,28 +0,0 @@ -module github.com/cosmos/gaia/v14 - -go 1.20 - -require ( - cosmossdk.io/errors v1.0.0 - cosmossdk.io/math v1.2.0 - github.com/cosmos/cosmos-sdk v0.45.16 - github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4 v4.1.1 - github.com/cosmos/ibc-go/v4 v4.4.2 - github.com/cosmos/interchain-security/v2 v2.0.0 - github.com/gogo/protobuf v1.3.3 - github.com/golang/protobuf v1.5.3 - github.com/google/gofuzz v1.2.0 - github.com/gorilla/mux v1.8.1 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/ory/dockertest/v3 v3.10.0 - github.com/rakyll/statik v0.1.7 - github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.8.0 - github.com/spf13/viper v1.17.0 - github.com/stretchr/testify v1.8.4 - github.com/tendermint/tendermint v0.34.27 - github.com/tendermint/tm-db v0.6.7 - google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb - google.golang.org/grpc v1.58.2 -) diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/juno/app.go b/ignite/pkg/cosmosanalysis/app/testdata/modules/juno/app.go deleted file mode 100644 index 71f3f87f58..0000000000 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/juno/app.go +++ /dev/null @@ -1,942 +0,0 @@ -package app - -import ( - "io" - "net/http" - "os" - "path/filepath" - "strings" - - storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/server" - - "cosmossdk.io/client/v2/autocli" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec/types" - authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" - "github.com/ignite-hq/cli/ignite/pkg/openapiconsole" - "github.com/spf13/cast" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - dbm "github.com/tendermint/tm-db" - - "github.com/CosmosContracts/juno/v10/docs" - "github.com/CosmosContracts/juno/v10/x/mint" - mintkeeper "github.com/CosmosContracts/juno/v10/x/mint/keeper" - minttypes "github.com/CosmosContracts/juno/v10/x/mint/types" - "github.com/cosmos/cosmos-sdk/baseapp" - "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/server/api" - "github.com/cosmos/cosmos-sdk/server/config" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" - store "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/version" - "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" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/auth/vesting" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/cosmos/cosmos-sdk/x/authz" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" - "github.com/cosmos/cosmos-sdk/x/bank" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/cosmos-sdk/x/crisis" - crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "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" - "github.com/cosmos/cosmos-sdk/x/params" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/cosmos/cosmos-sdk/x/slashing" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - "github.com/cosmos/cosmos-sdk/x/staking" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - 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" - transfer "github.com/cosmos/ibc-go/v3/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v3/modules/core" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v3/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper" - tmjson "github.com/tendermint/tendermint/libs/json" - - "github.com/CosmWasm/wasmd/x/wasm" - wasmclient "github.com/CosmWasm/wasmd/x/wasm/client" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/prometheus/client_golang/prometheus" - - ica "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - - encparams "github.com/CosmosContracts/juno/v10/app/params" -) - -const ( - AccountAddressPrefix = "juno" - Name = "juno" -) - -// We pull these out so we can set them with LDFLAGS in the Makefile -var ( - NodeDir = ".juno" - Bech32Prefix = "juno" - - // If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals. - // If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals. - ProposalsEnabled = "true" - // If set to non-empty string it must be comma-separated list of values that are all a subset - // of "EnableAllProposals" (takes precedence over ProposalsEnabled) - // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 - EnableSpecificProposals = "" -) - -// These constants are derived from the above variables. -// These are the ones we will want to use in the code, based on -// any overrides above -var ( - // DefaultNodeHome default home directories for Juno - DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir - - // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address - Bech32PrefixAccAddr = Bech32Prefix - // Bech32PrefixAccPub defines the Bech32 prefix of an account's public key - Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic - // Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address - Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator - // Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key - Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic - // Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address - Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus - // Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key - Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic -) - -// GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to -// produce a list of enabled proposals to pass into wasmd app. -func GetEnabledProposals() []wasm.ProposalType { - if EnableSpecificProposals == "" { - if ProposalsEnabled == "true" { - return wasm.EnableAllProposals - } - return wasm.DisableAllProposals - } - chunks := strings.Split(EnableSpecificProposals, ",") - proposals, err := wasm.ConvertToProposals(chunks) - if err != nil { - panic(err) - } - return proposals -} - -func GetWasmOpts(appOpts servertypes.AppOptions) []wasm.Option { - var wasmOpts []wasm.Option - if cast.ToBool(appOpts.Get("telemetry.enabled")) { - wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer)) - } - - wasmOpts = append(wasmOpts, wasmkeeper.WithGasRegister(NewJunoWasmGasRegister())) - - return wasmOpts -} - -func getGovProposalHandlers() []govclient.ProposalHandler { - var govProposalHandlers []govclient.ProposalHandler - // this line is used by starport scaffolding # stargate/app/govProposalHandlers - govProposalHandlers = wasmclient.ProposalHandlers - - govProposalHandlers = append(govProposalHandlers, - paramsclient.ProposalHandler, - distrclient.ProposalHandler, - upgradeclient.ProposalHandler, - upgradeclient.CancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, - ibcclientclient.UpgradeProposalHandler, - // this line is used by starport scaffolding # stargate/app/govProposalHandler - ) - - return govProposalHandlers -} - -var ( - - // ModuleBasics defines the module BasicManager is in charge of setting up basic, - // non-dependant module elements, such as codec registration - // and genesis verification. - ModuleBasics = module.NewBasicManager( - auth.AppModuleBasic{}, - genutil.AppModuleBasic{}, - bank.AppModuleBasic{}, - capability.AppModuleBasic{}, - staking.AppModuleBasic{}, - mint.AppModuleBasic{}, - distr.AppModuleBasic{}, - gov.NewAppModuleBasic(getGovProposalHandlers()...), - params.AppModuleBasic{}, - crisis.AppModuleBasic{}, - slashing.AppModuleBasic{}, - ibc.AppModuleBasic{}, - feegrantmodule.AppModuleBasic{}, - upgrade.AppModuleBasic{}, - evidence.AppModuleBasic{}, - transfer.AppModuleBasic{}, - vesting.AppModuleBasic{}, - authzmodule.AppModuleBasic{}, - wasm.AppModuleBasic{}, - ica.AppModuleBasic{}, - ) - - // module account permissions - maccPerms = map[string][]string{ - authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, - minttypes.ModuleName: {authtypes.Minter}, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - govtypes.ModuleName: {authtypes.Burner}, - ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - icatypes.ModuleName: nil, - wasm.ModuleName: {authtypes.Burner}, - } -) - -var ( - _ simapp.App = (*App)(nil) - _ servertypes.Application = (*App)(nil) -) - -// App extends an ABCI application, but with most of its parameters exported. -// They are exported for convenience in creating helper functions, as object -// capabilities aren't needed for testing. -type App struct { - *baseapp.BaseApp - - cdc *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 - - // keepers - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - AuthzKeeper authzkeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper - - ICAHostKeeper icahostkeeper.Keeper - - // make scoped keepers public for test purposes - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedICAHostKeeper capabilitykeeper.ScopedKeeper - ScopedTransferKeeper capabilitykeeper.ScopedKeeper - - // this line is used by starport scaffolding # stargate/app/keeperDeclaration - wasmKeeper wasm.Keeper - scopedWasmKeeper capabilitykeeper.ScopedKeeper - - // the module manager - mm *module.Manager - sm *module.SimulationManager -} - -// New returns a reference to an initialized Juno. -func New( - logger log.Logger, - db dbm.DB, - traceStore io.Writer, - loadLatest bool, - skipUpgradeHeights map[int64]bool, - homePath string, - invCheckPeriod uint, - encodingConfig encparams.EncodingConfig, - enabledProposals []wasm.ProposalType, - appOpts servertypes.AppOptions, - wasmOpts []wasm.Option, - baseAppOptions ...func(*baseapp.BaseApp), -) *App { - appCodec := encodingConfig.Marshaler - cdc := encodingConfig.Amino - interfaceRegistry := encodingConfig.InterfaceRegistry - - bApp := baseapp.NewBaseApp(Name, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) - bApp.SetCommitMultiStoreTracer(traceStore) - bApp.SetVersion(version.Version) - bApp.SetInterfaceRegistry(interfaceRegistry) - - keys := sdk.NewKVStoreKeys( - authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, - minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, - govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, - evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, - authzkeeper.StoreKey, feegrant.StoreKey, icahosttypes.StoreKey, - wasm.StoreKey, - ) - tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) - memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) - - app := &App{ - BaseApp: bApp, - cdc: cdc, - appCodec: appCodec, - interfaceRegistry: interfaceRegistry, - invCheckPeriod: invCheckPeriod, - keys: keys, - tkeys: tkeys, - memKeys: memKeys, - } - - app.ParamsKeeper = initParamsKeeper(appCodec, cdc, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey]) - - // set the BaseApp's parameter store - bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramskeeper.ConsensusParamsKeyTable())) - - // add capability keeper and ScopeToModule for ibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) - - // grant capabilities for the ibc and ibc-transfer modules - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) - scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) - scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - // this line is used by starport scaffolding # stargate/app/scopedKeeper - scopedWasmKeeper := app.CapabilityKeeper.ScopeToModule(wasm.ModuleName) - - // add keepers - app.AccountKeeper = authkeeper.NewAccountKeeper( - appCodec, keys[authtypes.StoreKey], app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, - ) - app.BankKeeper = bankkeeper.NewBaseKeeper( - appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.ModuleAccountAddrs(), - ) - stakingKeeper := stakingkeeper.NewKeeper( - appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName), - ) - app.MintKeeper = mintkeeper.NewKeeper( - appCodec, keys[minttypes.StoreKey], app.GetSubspace(minttypes.ModuleName), &stakingKeeper, - app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, - ) - app.DistrKeeper = distrkeeper.NewKeeper( - appCodec, keys[distrtypes.StoreKey], 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.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, - ) - app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, nil) - - // upgrade handlers - cfg := module.NewConfigurator(appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - - // register the staking hooks - // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper = *stakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), - ) - - // ... other modules keepers - - // Create IBC Keeper - app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, - ) - - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) - app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.BaseApp.MsgServiceRouter()) - - // register the proposal types - govRouter := govtypes.NewRouter() - govRouter.AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) - - // Create Transfer Keepers - app.TransferKeeper = ibctransferkeeper.NewKeeper( - appCodec, - keys[ibctransfertypes.StoreKey], - app.GetSubspace(ibctransfertypes.ModuleName), - app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - app.AccountKeeper, - app.BankKeeper, - scopedTransferKeeper, - ) - - transferModule := transfer.NewAppModule(app.TransferKeeper) - transferIBCModule := transfer.NewIBCModule(app.TransferKeeper) - - app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, - keys[icahosttypes.StoreKey], - app.GetSubspace(icahosttypes.SubModuleName), - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - app.AccountKeeper, - scopedICAHostKeeper, - app.MsgServiceRouter(), - ) - icaModule := ica.NewAppModule(nil, &app.ICAHostKeeper) - icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) - - // Create evidence Keeper for to register the IBC light client misbehaviour evidence route - evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, keys[evidencetypes.StoreKey], &app.StakingKeeper, app.SlashingKeeper, - ) - // If evidence needs to be handled for the app, set routes in router here and seal - app.EvidenceKeeper = *evidenceKeeper - - // this line is used by starport scaffolding # stargate/app/keeperDefinition - wasmDir := filepath.Join(homePath, "data") - - wasmConfig, err := wasm.ReadWasmConfig(appOpts) - if err != nil { - panic("error while reading wasm config: " + err.Error()) - } - - // The last arguments can contain custom message handlers, and custom query handlers, - // if we want to allow any custom callbacks - supportedFeatures := "iterator,staking,stargate" - app.wasmKeeper = wasm.NewKeeper( - appCodec, - keys[wasm.StoreKey], - app.GetSubspace(wasm.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.StakingKeeper, - app.DistrKeeper, - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - scopedWasmKeeper, - app.TransferKeeper, - app.MsgServiceRouter(), - app.GRPCQueryRouter(), - wasmDir, - wasmConfig, - supportedFeatures, - wasmOpts..., - ) - - ibcRouter := porttypes.NewRouter() - - // register wasm gov proposal types - // The gov proposal types can be individually enabled - if len(enabledProposals) != 0 { - govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.wasmKeeper, enabledProposals)) - } - - // Create static IBC router, add transfer route, then set and seal it - ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule). - AddRoute(wasm.ModuleName, wasm.NewIBCHandler(app.wasmKeeper, app.IBCKeeper.ChannelKeeper)). - AddRoute(icahosttypes.SubModuleName, icaHostIBCModule) - app.IBCKeeper.SetRouter(ibcRouter) - - app.GovKeeper = govkeeper.NewKeeper( - appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, govRouter, - ) - - /**** Module Options ****/ - - // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment - // we prefer to be more strict in what arguments the modules expect. - skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) - - // NOTE: Any module instantiated in the module manager that is later modified - // must be passed by reference here. - - app.mm = module.NewManager( - genutil.NewAppModule( - app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, - encodingConfig.TxConfig, - ), - auth.NewAppModule(appCodec, app.AccountKeeper, nil), - vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), - 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), - upgrade.NewAppModule(app.UpgradeKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - ibc.NewAppModule(app.IBCKeeper), - params.NewAppModule(app.ParamsKeeper), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - transferModule, - icaModule, - // this line is used by starport scaffolding # stargate/app/appModule - wasm.NewAppModule(appCodec, &app.wasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - ) - - // During begin block slashing happens after distr.BeginBlocker so that - // there is nothing left over in the validator fee pool, so as to keep the - // CanWithdrawInvariant invariant. - // NOTE: staking module is required if HistoricalEntries param > 0 - app.mm.SetOrderBeginBlockers( - upgradetypes.ModuleName, - capabilitytypes.ModuleName, - minttypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - evidencetypes.ModuleName, - stakingtypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - govtypes.ModuleName, - crisistypes.ModuleName, - genutiltypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - paramstypes.ModuleName, - vestingtypes.ModuleName, - // additional modules - ibchost.ModuleName, - ibctransfertypes.ModuleName, - icatypes.ModuleName, - wasm.ModuleName, - ) - - app.mm.SetOrderEndBlockers( - crisistypes.ModuleName, - govtypes.ModuleName, - stakingtypes.ModuleName, - capabilitytypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - minttypes.ModuleName, - genutiltypes.ModuleName, - evidencetypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - paramstypes.ModuleName, - upgradetypes.ModuleName, - vestingtypes.ModuleName, - // additional non simd modules - ibchost.ModuleName, - ibctransfertypes.ModuleName, - icatypes.ModuleName, - wasm.ModuleName, - ) - - // NOTE: The genutils module must occur after staking so that pools are - // properly initialized with tokens from genesis accounts. - // NOTE: Capability module must occur first so that it can initialize any capabilities - // so that other modules that want to create or claim capabilities afterwards in InitChain - // can do so safely. - app.mm.SetOrderInitGenesis( - capabilitytypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - stakingtypes.ModuleName, - slashingtypes.ModuleName, - govtypes.ModuleName, - minttypes.ModuleName, - crisistypes.ModuleName, - genutiltypes.ModuleName, - evidencetypes.ModuleName, - authz.ModuleName, - paramstypes.ModuleName, - upgradetypes.ModuleName, - vestingtypes.ModuleName, - feegrant.ModuleName, - // this line is used by starport scaffolding # stargate/app/initGenesis - ibchost.ModuleName, - ibctransfertypes.ModuleName, - icatypes.ModuleName, - wasm.ModuleName, - ) - - app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) - app.mm.RegisterServices(cfg) - // initialize stores - app.MountKVStores(keys) - app.MountTransientStores(tkeys) - app.MountMemoryStores(memKeys) - - // register upgrade - app.RegisterUpgradeHandlers(cfg) - - anteHandler, err := NewAnteHandler( - HandlerOptions{ - HandlerOptions: ante.HandlerOptions{ - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - FeegrantKeeper: app.FeeGrantKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - }, - IBCKeeper: app.IBCKeeper, - TxCounterStoreKey: keys[wasm.StoreKey], - WasmConfig: wasmConfig, - Cdc: appCodec, - }, - ) - if err != nil { - panic(err) - } - - // initialize BaseApp - app.SetInitChainer(app.InitChainer) - app.SetBeginBlocker(app.BeginBlocker) - app.SetAnteHandler(anteHandler) - app.SetEndBlocker(app.EndBlocker) - - if manager := app.SnapshotManager(); manager != nil { - err = manager.RegisterExtensions( - wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.wasmKeeper), - ) - if err != nil { - panic("failed to register snapshot extension: " + err.Error()) - } - } - - upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() - if err != nil { - panic(err) - } - - if upgradeInfo.Name == "multiverse" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - storeUpgrades := store.StoreUpgrades{ - Added: []string{icacontrollertypes.StoreKey, icahosttypes.StoreKey}, - } - - app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) - } - - if loadLatest { - if err := app.LoadLatestVersion(); err != nil { - tmos.Exit(err.Error()) - } - - // Initialize and seal the capability keeper so all persistent capabilities - // are loaded in-memory and prevent any further modules from creating scoped - // sub-keepers. - // This must be done during creation of baseapp rather than in InitChain so - // that in-memory capabilities get regenerated on app restart. - // Note that since this reads from the store, we can only perform it when - // `loadLatest` is set to true. - app.CapabilityKeeper.Seal() - } - - app.ScopedIBCKeeper = scopedIBCKeeper - app.ScopedTransferKeeper = scopedTransferKeeper - // this line is used by starport scaffolding # stargate/app/beforeInitReturn - app.scopedWasmKeeper = scopedWasmKeeper - app.ScopedICAHostKeeper = scopedICAHostKeeper - - // create the simulation manager and define the order of the modules for deterministic simulations - // - // NOTE: this is not required apps that don't use the simulator for fuzz testing - // transactions - app.sm = module.NewSimulationManager( - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - 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), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - params.NewAppModule(app.ParamsKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - wasm.NewAppModule(appCodec, &app.wasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - ibc.NewAppModule(app.IBCKeeper), - transferModule, - ) - - app.sm.RegisterStoreDecoders() - - return app -} - -// Name returns the name of the App -func (app *App) Name() string { return app.BaseApp.Name() } - -// BeginBlocker application updates every begin block -func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - return app.mm.BeginBlock(ctx, req) -} - -// EndBlocker application updates every end block -func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.mm.EndBlock(ctx, req) -} - -// InitChainer application update at chain initialization -func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { - var genesisState GenesisState - if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { - panic(err) - } - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) -} - -// LoadHeight loads a particular height -func (app *App) LoadHeight(height int64) error { - return app.LoadVersion(height) -} - -// ModuleAccountAddrs returns all the app's module account addresses. -func (app *App) ModuleAccountAddrs() map[string]bool { - modAccAddrs := make(map[string]bool) - for acc := range maccPerms { - modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true - } - - return modAccAddrs -} - -// LegacyAmino returns SimApp's amino codec. -// -// 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 *App) LegacyAmino() *codec.LegacyAmino { - return app.cdc -} - -// AppCodec returns Juno's app codec. -// -// 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 *App) AppCodec() codec.Codec { - return app.appCodec -} - -// InterfaceRegistry returns Juno's InterfaceRegistry -func (app *App) InterfaceRegistry() types.InterfaceRegistry { - return app.interfaceRegistry -} - -// GetKey returns the KVStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *App) GetKey(storeKey string) *sdk.KVStoreKey { - return app.keys[storeKey] -} - -// GetTKey returns the TransientStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *App) GetTKey(storeKey string) *sdk.TransientStoreKey { - return app.tkeys[storeKey] -} - -// GetMemKey returns the MemStoreKey for the provided mem key. -// -// NOTE: This is solely used for testing purposes. -func (app *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey { - return app.memKeys[storeKey] -} - -// GetSubspace returns a param subspace for a given module name. -// -// NOTE: This is solely to be used for testing purposes. -func (app *App) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// RegisterAPIRoutes registers all application module routes with the provided -// API server. -func (app *App) 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 app's OpenAPI routes. - apiSvr.Router.Handle("/static/openapi.yml", http.FileServer(http.FS(docs.Docs))) - apiSvr.Router.HandleFunc("/", openapiconsole.Handler(Name, "/static/openapi.yml")) -} - -// RegisterTxService implements the Application.RegisterTxService method. -func (app *App) RegisterTxService(clientCtx client.Context) { - authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) -} - -// RegisterTendermintService implements the Application.RegisterTendermintService method. -func (app *App) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry) -} - -// RegisterUpgradeHandlers returns upgrade handlers - -func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) { - app.UpgradeKeeper.SetUpgradeHandler("v10", - func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // transfer module consensus version has been bumped to 2 - return app.mm.RunMigrations(ctx, cfg, fromVM) - }) -} - -// GetMaccPerms returns a copy of the module account permissions -func GetMaccPerms() map[string][]string { - dupMaccPerms := make(map[string][]string) - for k, v := range maccPerms { - dupMaccPerms[k] = v - } - return dupMaccPerms -} - -// initParamsKeeper init params keeper and its subspaces -func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper { - paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) - - paramsKeeper.Subspace(authtypes.ModuleName) - paramsKeeper.Subspace(banktypes.ModuleName) - paramsKeeper.Subspace(stakingtypes.ModuleName) - paramsKeeper.Subspace(minttypes.ModuleName) - paramsKeeper.Subspace(distrtypes.ModuleName) - paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()) - paramsKeeper.Subspace(crisistypes.ModuleName) - paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(ibchost.ModuleName) - paramsKeeper.Subspace(icahosttypes.SubModuleName) - paramsKeeper.Subspace(wasm.ModuleName) - - return paramsKeeper -} - -// SimulationManager implements the SimulationApp interface -func (app *App) SimulationManager() *module.SimulationManager { - return app.sm -} - -func (App) TxConfig() client.TxConfig { return nil } -func (App) AutoCliOpts() autocli.AppOptions { return autocli.AppOptions{} } - -// GetKey returns the KVStoreKey for the provided store key. -func (App) GetKey(storeKey string) *storetypes.KVStoreKey { - sk := app.UnsafeFindStoreKey(storeKey) - kvStoreKey, ok := sk.(*storetypes.KVStoreKey) - if !ok { - return nil - } - return kvStoreKey -} - -// GetMemKey returns the MemoryStoreKey for the provided store key. -func (App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { - key, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.MemoryStoreKey) - if !ok { - return nil - } - - return key -} - -// kvStoreKeys returns all the kv store keys registered inside App. -func (App) kvStoreKeys() map[string]*storetypes.KVStoreKey { - keys := make(map[string]*storetypes.KVStoreKey) - for _, k := range app.GetStoreKeys() { - if kv, ok := k.(*storetypes.KVStoreKey); ok { - keys[kv.Name()] = kv - } - } - - return keys -} - -// GetSubspace returns a param subspace for a given module name. -func (App) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// SimulationManager implements the SimulationApp interface -func (App) SimulationManager() *module.SimulationManager { - return app.sm -} - -// RegisterAPIRoutes registers all application module routes with the provided -// API server. -func (App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { - app.App.RegisterAPIRoutes(apiSvr, apiConfig) - // register swagger API in app.go so that other applications can override easily - if err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil { - panic(err) - } -} diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/juno/go.mod b/ignite/pkg/cosmosanalysis/app/testdata/modules/juno/go.mod deleted file mode 100644 index 4e54576720..0000000000 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/juno/go.mod +++ /dev/null @@ -1,33 +0,0 @@ -module github.com/CosmosContracts/juno/v18 - -go 1.23 - -require ( - cosmossdk.io/api v0.3.1 - cosmossdk.io/errors v1.0.0 - cosmossdk.io/log v1.2.1 - cosmossdk.io/math v1.1.2 - cosmossdk.io/tools/rosetta v0.2.1 - github.com/CosmWasm/wasmd v0.45.0 - github.com/CosmWasm/wasmvm v1.5.0 - github.com/cometbft/cometbft v0.37.2 - github.com/cometbft/cometbft-db v0.8.0 - github.com/cosmos/cosmos-sdk v0.47.5 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.1 - github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.0.0 - github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230803181732-7c8f814d3b79 - github.com/cosmos/ibc-go/v7 v7.3.1 - github.com/golang/protobuf v1.5.3 - github.com/gorilla/mux v1.8.0 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/prometheus/client_golang v1.16.0 - github.com/skip-mev/pob v1.0.4 - github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.7.0 - github.com/spf13/viper v1.16.0 - github.com/stretchr/testify v1.8.4 - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.3 - gopkg.in/yaml.v2 v2.4.0 -) diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/runtime/app.go b/ignite/pkg/cosmosanalysis/app/testdata/modules/runtime/app.go index 8684282186..cfeaca69a6 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/runtime/app.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/modules/runtime/app.go @@ -3,6 +3,15 @@ package app import ( "cosmossdk.io/api/tendermint/abci" "cosmossdk.io/client/v2/autocli" + "cosmossdk.io/x/bank" + bankkeeper "cosmossdk.io/x/bank/keeper" + "cosmossdk.io/x/gov" + govclient "cosmossdk.io/x/gov/client" + govkeeper "cosmossdk.io/x/gov/keeper" + paramsclient "cosmossdk.io/x/params/client" + paramstypes "cosmossdk.io/x/params/types" + "cosmossdk.io/x/staking" + stakingkeeper "cosmossdk.io/x/staking/keeper" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" @@ -14,15 +23,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - "github.com/cosmos/cosmos-sdk/x/bank" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - "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" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/cosmos/cosmos-sdk/x/staking" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/gogo/protobuf/codec" foomodule "github.com/username/test/x/foo" fookeeper "github.com/username/test/x/foo/keeper" diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/single_app/app.go b/ignite/pkg/cosmosanalysis/app/testdata/modules/single_app/app.go index 860e384889..4ec580a96d 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/single_app/app.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/modules/single_app/app.go @@ -1,6 +1,10 @@ package app import ( + bankkeeper "cosmossdk.io/x/bank/keeper" + govkeeper "cosmossdk.io/x/gov/keeper" + paramstypes "cosmossdk.io/x/params/types" + stakingkeeper "cosmossdk.io/x/staking/keeper" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" @@ -9,10 +13,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" "github.com/gogo/protobuf/codec" abci "github.com/tendermint/tendermint/abci/types" fookeeper "github.com/username/test/x/foo/keeper" @@ -24,6 +25,7 @@ type Foo struct { StakingKeeper stakingkeeper.Keeper GovKeeper govkeeper.Keeper FooKeeper fookeeper.Keeper + ibckeeper ibckeeper.Keeper } func (Foo) Name() string { diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/app.go b/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/app.go deleted file mode 100644 index 0da49006f5..0000000000 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/app.go +++ /dev/null @@ -1,1104 +0,0 @@ -package app - -import ( - "io" - "net/http" - "os" - "path/filepath" - - "github.com/cosmos/cosmos-sdk/server" - - "cosmossdk.io/client/v2/autocli" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - - "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/codec" - "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/server/api" - "github.com/cosmos/cosmos-sdk/server/config" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/cosmos/cosmos-sdk/x/auth/ante" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/auth/vesting" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/cosmos/cosmos-sdk/x/authz" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" - "github.com/cosmos/cosmos-sdk/x/bank" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/cosmos-sdk/x/crisis" - crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "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/params" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/cosmos/cosmos-sdk/x/slashing" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - "github.com/cosmos/cosmos-sdk/x/staking" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - 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/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" - ibcporttypes "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" - "github.com/spf13/cast" - abci "github.com/tendermint/tendermint/abci/types" - tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - dbm "github.com/tendermint/tm-db" - - "github.com/ignite/modules/x/claim" - claimkeeper "github.com/ignite/modules/x/claim/keeper" - claimtypes "github.com/ignite/modules/x/claim/types" - "github.com/ignite/modules/x/mint" - mintkeeper "github.com/ignite/modules/x/mint/keeper" - minttypes "github.com/ignite/modules/x/mint/types" - "github.com/tendermint/fundraising/x/fundraising" - fundraisingkeeper "github.com/tendermint/fundraising/x/fundraising/keeper" - fundraisingtypes "github.com/tendermint/fundraising/x/fundraising/types" - - "github.com/tendermint/spn/cmd" - "github.com/tendermint/spn/docs" - spntypes "github.com/tendermint/spn/pkg/types" - "github.com/tendermint/spn/x/campaign" - campaignkeeper "github.com/tendermint/spn/x/campaign/keeper" - campaigntypes "github.com/tendermint/spn/x/campaign/types" - "github.com/tendermint/spn/x/launch" - launchkeeper "github.com/tendermint/spn/x/launch/keeper" - launchtypes "github.com/tendermint/spn/x/launch/types" - "github.com/tendermint/spn/x/monitoringc" - monitoringckeeper "github.com/tendermint/spn/x/monitoringc/keeper" - monitoringctypes "github.com/tendermint/spn/x/monitoringc/types" - "github.com/tendermint/spn/x/monitoringp" - monitoringpkeeper "github.com/tendermint/spn/x/monitoringp/keeper" - monitoringptypes "github.com/tendermint/spn/x/monitoringp/types" - "github.com/tendermint/spn/x/participation" - participationkeeper "github.com/tendermint/spn/x/participation/keeper" - participationtypes "github.com/tendermint/spn/x/participation/types" - "github.com/tendermint/spn/x/profile" - profilekeeper "github.com/tendermint/spn/x/profile/keeper" - profiletypes "github.com/tendermint/spn/x/profile/types" - "github.com/tendermint/spn/x/reward" - rewardkeeper "github.com/tendermint/spn/x/reward/keeper" - rewardtypes "github.com/tendermint/spn/x/reward/types" -) - -const ( - // missionIDStaking is the mission ID for staking mission to claim airdrop - missionIDStaking = 1 - - // missionIDVoting is the mission ID for voting mission to claim airdrop - missionIDVoting = 2 -) - -// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals - -func getGovProposalHandlers() []govclient.ProposalHandler { - var govProposalHandlers []govclient.ProposalHandler - // this line is used by starport scaffolding # stargate/app/govProposalHandlers - - govProposalHandlers = append(govProposalHandlers, - paramsclient.ProposalHandler, - distrclient.ProposalHandler, - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, - // this line is used by starport scaffolding # stargate/app/govProposalHandler - ) - - return govProposalHandlers -} - -var ( - // DefaultNodeHome default home directories for the application daemon - DefaultNodeHome string - - // ModuleBasics defines the module BasicManager is in charge of setting up basic, - // non-dependant module elements, such as codec registration - // and genesis verification. - ModuleBasics = module.NewBasicManager( - auth.AppModuleBasic{}, - genutil.AppModuleBasic{}, - bank.AppModuleBasic{}, - capability.AppModuleBasic{}, - staking.AppModuleBasic{}, - mint.AppModuleBasic{}, - distr.AppModuleBasic{}, - gov.NewAppModuleBasic(getGovProposalHandlers()), - params.AppModuleBasic{}, - crisis.AppModuleBasic{}, - slashing.AppModuleBasic{}, - feegrantmodule.AppModuleBasic{}, - authzmodule.AppModuleBasic{}, - ibc.AppModuleBasic{}, - upgrade.AppModuleBasic{}, - evidence.AppModuleBasic{}, - transfer.AppModuleBasic{}, - vesting.AppModuleBasic{}, - participation.AppModuleBasic{}, - claim.AppModuleBasic{}, - // this line is used by starport scaffolding # stargate/app/moduleBasic - profile.AppModuleBasic{}, - launch.AppModuleBasic{}, - campaign.AppModuleBasic{}, - monitoringc.AppModuleBasic{}, - monitoringp.AppModuleBasic{}, - reward.AppModuleBasic{}, - fundraising.AppModuleBasic{}, - ) - - // module account permissions - maccPerms = map[string][]string{ - authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, - minttypes.ModuleName: {authtypes.Minter}, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - govtypes.ModuleName: {authtypes.Burner}, - ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - campaigntypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - rewardtypes.ModuleName: nil, - fundraisingtypes.ModuleName: nil, - monitoringctypes.ModuleName: nil, - monitoringptypes.ModuleName: nil, - claimtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - // this line is used by starport scaffolding # stargate/app/maccPerms - } -) - -var ( - _ cmd.App = (*App)(nil) - _ servertypes.Application = (*App)(nil) - _ simapp.App = (*App)(nil) -) - -func init() { - userHomeDir, err := os.UserHomeDir() - if err != nil { - panic(err) - } - - DefaultNodeHome = filepath.Join(userHomeDir, "."+spntypes.Name) -} - -// App extends an ABCI application, but with most of its parameters exported. -// They are exported for convenience in creating helper functions, as object -// capabilities aren't needed for testing. -type App struct { - *baseapp.BaseApp - - cdc *codec.LegacyAmino - appCodec codec.Codec - interfaceRegistry types.InterfaceRegistry - - invCheckPeriod uint - - // keys to access the substores - keys map[string]*storetypes.KVStoreKey - tkeys map[string]*storetypes.TransientStoreKey - memKeys map[string]*storetypes.MemoryStoreKey - - // keepers - AuthKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper - AuthzKeeper authzkeeper.Keeper - FundraisingKeeper fundraisingkeeper.Keeper - - // make scoped keepers public for test purposes - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedTransferKeeper capabilitykeeper.ScopedKeeper - - ScopedMonitoringcKeeper capabilitykeeper.ScopedKeeper - - ProfileKeeper profilekeeper.Keeper - LaunchKeeper launchkeeper.Keeper - CampaignKeeper campaignkeeper.Keeper - MonitoringcKeeper monitoringckeeper.Keeper - MonitoringpKeeper monitoringpkeeper.Keeper - RewardKeeper rewardkeeper.Keeper - ParticipationKeeper participationkeeper.Keeper - ClaimKeeper claimkeeper.Keeper - // this line is used by starport scaffolding # stargate/app/keeperDeclaration - - transferModule transfer.AppModule - - // the module manager - mm *module.Manager - - // simulation manager - sm *module.SimulationManager -} - -// New returns a reference to an initialized spn app. -func New( - logger log.Logger, - db dbm.DB, - traceStore io.Writer, - loadLatest bool, - skipUpgradeHeights map[int64]bool, - homePath string, - invCheckPeriod uint, - encodingConfig cmd.EncodingConfig, - appOpts servertypes.AppOptions, - baseAppOptions ...func(*baseapp.BaseApp), -) cmd.App { - appCodec := encodingConfig.Marshaler - cdc := encodingConfig.Amino - interfaceRegistry := encodingConfig.InterfaceRegistry - - bApp := baseapp.NewBaseApp(spntypes.Name, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) - bApp.SetCommitMultiStoreTracer(traceStore) - bApp.SetVersion(version.Version) - bApp.SetInterfaceRegistry(interfaceRegistry) - - keys := sdk.NewKVStoreKeys( - authtypes.StoreKey, - banktypes.StoreKey, - stakingtypes.StoreKey, - minttypes.StoreKey, - distrtypes.StoreKey, - slashingtypes.StoreKey, - govtypes.StoreKey, - paramstypes.StoreKey, - ibchost.StoreKey, - upgradetypes.StoreKey, - feegrant.StoreKey, - authzkeeper.StoreKey, - evidencetypes.StoreKey, - ibctransfertypes.StoreKey, - capabilitytypes.StoreKey, - profiletypes.StoreKey, - launchtypes.StoreKey, - campaigntypes.StoreKey, - monitoringctypes.StoreKey, - monitoringptypes.StoreKey, - rewardtypes.StoreKey, - fundraisingtypes.StoreKey, - participationtypes.StoreKey, - claimtypes.StoreKey, - // this line is used by starport scaffolding # stargate/app/storeKey - ) - tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) - memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) - - app := &App{ - BaseApp: bApp, - cdc: cdc, - appCodec: appCodec, - interfaceRegistry: interfaceRegistry, - invCheckPeriod: invCheckPeriod, - keys: keys, - tkeys: tkeys, - memKeys: memKeys, - } - - app.ParamsKeeper = initParamsKeeper( - appCodec, - cdc, - keys[paramstypes.StoreKey], - tkeys[paramstypes.TStoreKey], - ) - - // set the BaseApp's parameter store - bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable())) - - // add capability keeper and ScopeToModule for ibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper( - appCodec, - keys[capabilitytypes.StoreKey], - memKeys[capabilitytypes.MemStoreKey], - ) - - // grant capabilities for the ibc and ibc-transfer modules - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) - scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - // this line is used by starport scaffolding # stargate/app/scopedKeeper - - // add keepers - app.AuthKeeper = authkeeper.NewAccountKeeper( - appCodec, - keys[authtypes.StoreKey], - app.GetSubspace(authtypes.ModuleName), - authtypes.ProtoBaseAccount, - maccPerms, - spntypes.AccountAddressPrefix, - ) - - app.AuthzKeeper = authzkeeper.NewKeeper( - keys[authzkeeper.StoreKey], - appCodec, - app.BaseApp.MsgServiceRouter(), - app.AuthKeeper, - ) - - app.BankKeeper = bankkeeper.NewBaseKeeper( - appCodec, - keys[banktypes.StoreKey], - app.AuthKeeper, - app.GetSubspace(banktypes.ModuleName), - app.ModuleAccountAddrs(), - ) - - stakingKeeper := stakingkeeper.NewKeeper( - appCodec, - keys[stakingtypes.StoreKey], - app.AuthKeeper, - app.BankKeeper, - app.GetSubspace(stakingtypes.ModuleName), - ) - - app.DistrKeeper = distrkeeper.NewKeeper( - appCodec, - keys[distrtypes.StoreKey], - app.GetSubspace(distrtypes.ModuleName), - app.AuthKeeper, - app.BankKeeper, - &stakingKeeper, - authtypes.FeeCollectorName, - ) - app.MintKeeper = mintkeeper.NewKeeper( - appCodec, - keys[minttypes.StoreKey], - app.GetSubspace(minttypes.ModuleName), - &stakingKeeper, - app.AuthKeeper, - app.BankKeeper, - app.DistrKeeper, - authtypes.FeeCollectorName, - ) - app.SlashingKeeper = slashingkeeper.NewKeeper( - appCodec, - keys[slashingtypes.StoreKey], - &stakingKeeper, - app.GetSubspace(slashingtypes.ModuleName), - ) - - app.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), - invCheckPeriod, app.BankKeeper, - authtypes.FeeCollectorName, - ) - - app.FeeGrantKeeper = feegrantkeeper.NewKeeper( - appCodec, - keys[feegrant.StoreKey], - app.AuthKeeper, - ) - - app.UpgradeKeeper = upgradekeeper.NewKeeper( - skipUpgradeHeights, - keys[upgradetypes.StoreKey], - appCodec, - homePath, - app.BaseApp, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - - // ... other modules keepers - - // Create IBC Keeper - app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, - keys[ibchost.StoreKey], - app.GetSubspace(ibchost.ModuleName), - stakingKeeper, - app.UpgradeKeeper, - scopedIBCKeeper, - ) - - // register the proposal types - 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)). - AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) - - // Create Transfer Keepers - app.TransferKeeper = ibctransferkeeper.NewKeeper( - appCodec, - keys[ibctransfertypes.StoreKey], - app.GetSubspace(ibctransfertypes.ModuleName), - app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - app.AuthKeeper, - app.BankKeeper, - scopedTransferKeeper, - ) - app.transferModule = transfer.NewAppModule(app.TransferKeeper) - transferIBCModule := transfer.NewIBCModule(app.TransferKeeper) - - // Create evidence Keeper for to register the IBC light client misbehaviour evidence route - evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, - keys[evidencetypes.StoreKey], - &stakingKeeper, - app.SlashingKeeper, - ) - // If evidence needs to be handled for the app, set routes in router here and seal - app.EvidenceKeeper = *evidenceKeeper - - govConfig := govtypes.DefaultConfig() - app.GovKeeper = govkeeper.NewKeeper( - appCodec, - keys[govtypes.StoreKey], - app.GetSubspace(govtypes.ModuleName), - app.AuthKeeper, - app.BankKeeper, - &stakingKeeper, - govRouter, - app.MsgServiceRouter(), - govConfig, - ) - - app.FundraisingKeeper = fundraisingkeeper.NewKeeper( - appCodec, - keys[fundraisingtypes.StoreKey], - keys[fundraisingtypes.MemStoreKey], - app.GetSubspace(fundraisingtypes.ModuleName), - app.AuthKeeper, - app.BankKeeper, - app.DistrKeeper, - ) - - app.ProfileKeeper = *profilekeeper.NewKeeper( - appCodec, - keys[profiletypes.StoreKey], - keys[profiletypes.MemStoreKey], - ) - - app.LaunchKeeper = *launchkeeper.NewKeeper( - appCodec, - keys[launchtypes.StoreKey], - keys[launchtypes.MemStoreKey], - app.GetSubspace(launchtypes.ModuleName), - app.DistrKeeper, - app.ProfileKeeper, - ) - - app.RewardKeeper = *rewardkeeper.NewKeeper( - appCodec, - keys[rewardtypes.StoreKey], - keys[rewardtypes.MemStoreKey], - app.GetSubspace(rewardtypes.ModuleName), - app.AuthKeeper, - app.BankKeeper, - app.ProfileKeeper, - app.LaunchKeeper, - ) - - campaignKeeper := campaignkeeper.NewKeeper( - appCodec, - keys[campaigntypes.StoreKey], - keys[campaigntypes.MemStoreKey], - app.GetSubspace(campaigntypes.ModuleName), - &app.LaunchKeeper, - app.BankKeeper, - app.DistrKeeper, - app.ProfileKeeper, - ) - app.CampaignKeeper = *campaignKeeper - app.LaunchKeeper.SetCampaignKeeper(campaignKeeper) - - scopedMonitoringcKeeper := app.CapabilityKeeper.ScopeToModule(monitoringctypes.ModuleName) - app.ScopedMonitoringcKeeper = scopedMonitoringcKeeper - app.MonitoringcKeeper = *monitoringckeeper.NewKeeper( - appCodec, - keys[monitoringctypes.StoreKey], - keys[monitoringctypes.MemStoreKey], - app.GetSubspace(monitoringctypes.ModuleName), - app.IBCKeeper.ClientKeeper, - app.IBCKeeper.ConnectionKeeper, - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - scopedMonitoringcKeeper, - app.LaunchKeeper, - app.RewardKeeper, - ) - app.LaunchKeeper.SetMonitoringcKeeper(app.MonitoringcKeeper) - monitoringcModule := monitoringc.NewAppModule(appCodec, app.MonitoringcKeeper, app.AuthKeeper, app.BankKeeper) - - scopedMonitoringKeeper := app.CapabilityKeeper.ScopeToModule(monitoringptypes.ModuleName) - app.MonitoringpKeeper = *monitoringpkeeper.NewKeeper( - appCodec, - keys[monitoringptypes.StoreKey], - keys[monitoringptypes.MemStoreKey], - app.GetSubspace(monitoringptypes.ModuleName), - stakingKeeper, - app.IBCKeeper.ClientKeeper, - app.IBCKeeper.ConnectionKeeper, - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - scopedMonitoringKeeper, - ) - monitoringpModule := monitoringp.NewAppModule(appCodec, app.MonitoringpKeeper) - - app.ParticipationKeeper = *participationkeeper.NewKeeper( - appCodec, - keys[participationtypes.StoreKey], - keys[participationtypes.MemStoreKey], - app.GetSubspace(participationtypes.ModuleName), - app.FundraisingKeeper, - stakingKeeper, - ) - - app.ClaimKeeper = *claimkeeper.NewKeeper( - appCodec, - keys[claimtypes.StoreKey], - keys[claimtypes.MemStoreKey], - app.GetSubspace(claimtypes.ModuleName), - app.AuthKeeper, - app.DistrKeeper, - app.BankKeeper, - ) - - // set fundraising hooks - app.FundraisingKeeper = *app.FundraisingKeeper.SetHooks( - app.CampaignKeeper.CampaignAuctionEventHooks(), - ) - - // this line is used by starport scaffolding # stargate/app/keeperDefinition - - // register the staking hooks - // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper = *stakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks( - app.DistrKeeper.Hooks(), - app.SlashingKeeper.Hooks(), - app.ClaimKeeper.NewMissionDelegationHooks(missionIDStaking), - ), - ) - - // register the gov hooks - app.GovKeeper = *app.GovKeeper.SetHooks( - govtypes.NewMultiGovHooks( - app.ClaimKeeper.NewMissionVoteHooks(missionIDVoting), - ), - ) - - // Create static IBC router, add transfer route, then set and seal it - ibcRouter := ibcporttypes.NewRouter() - ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule) - ibcRouter.AddRoute(monitoringctypes.ModuleName, monitoringcModule) - ibcRouter.AddRoute(monitoringptypes.ModuleName, monitoringpModule) - // this line is used by starport scaffolding # ibc/app/router - app.IBCKeeper.SetRouter(ibcRouter) - - /**** Module Options ****/ - - // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment - // we prefer to be more strict in what arguments the modules expect. - skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) - - // NOTE: Any module instantiated in the module manager that is later modified - // must be passed by reference here. - - app.mm = module.NewManager( - genutil.NewAppModule( - app.AuthKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, - encodingConfig.TxConfig, - ), - auth.NewAppModule(appCodec, app.AuthKeeper, nil), - vesting.NewAppModule(app.AuthKeeper, app.BankKeeper), - bank.NewAppModule(appCodec, app.BankKeeper, app.AuthKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - feegrantmodule.NewAppModule(appCodec, app.AuthKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AuthKeeper, app.BankKeeper, app.interfaceRegistry), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), - gov.NewAppModule(appCodec, app.GovKeeper, app.AuthKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AuthKeeper, app.BankKeeper, app.StakingKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AuthKeeper, app.BankKeeper, app.StakingKeeper), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AuthKeeper, app.BankKeeper), - upgrade.NewAppModule(app.UpgradeKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - ibc.NewAppModule(app.IBCKeeper), - params.NewAppModule(app.ParamsKeeper), - app.transferModule, - profile.NewAppModule(appCodec, app.ProfileKeeper, app.AuthKeeper, app.BankKeeper), - launch.NewAppModule(appCodec, app.LaunchKeeper, app.AuthKeeper, app.BankKeeper), - campaign.NewAppModule(appCodec, app.CampaignKeeper, app.AuthKeeper, app.BankKeeper, app.ProfileKeeper), - monitoringcModule, - monitoringpModule, - reward.NewAppModule(appCodec, app.RewardKeeper, app.AuthKeeper, app.BankKeeper), - fundraising.NewAppModule(appCodec, app.FundraisingKeeper, app.AuthKeeper, app.BankKeeper, app.DistrKeeper), - participation.NewAppModule(appCodec, app.ParticipationKeeper, app.AuthKeeper, app.BankKeeper, app.FundraisingKeeper), - claim.NewAppModule(appCodec, app.ClaimKeeper, app.AuthKeeper, app.BankKeeper), - // this line is used by starport scaffolding # stargate/app/appModule - ) - - // During begin block slashing happens after distr.BeginBlocker so that - // there is nothing left over in the validator fee pool, so as to keep the - // CanWithdrawInvariant invariant. - // NOTE: staking module is required if HistoricalEntries param > 0 - app.mm.SetOrderBeginBlockers( - upgradetypes.ModuleName, - capabilitytypes.ModuleName, - minttypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - evidencetypes.ModuleName, - claimtypes.ModuleName, - stakingtypes.ModuleName, - vestingtypes.ModuleName, - ibchost.ModuleName, - ibctransfertypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - govtypes.ModuleName, - crisistypes.ModuleName, - genutiltypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - paramstypes.ModuleName, - profiletypes.ModuleName, - fundraisingtypes.ModuleName, - rewardtypes.ModuleName, - campaigntypes.ModuleName, - monitoringctypes.ModuleName, - monitoringptypes.ModuleName, - participationtypes.ModuleName, - launchtypes.ModuleName, - ) - - app.mm.SetOrderEndBlockers( - fundraisingtypes.ModuleName, - crisistypes.ModuleName, - govtypes.ModuleName, - claimtypes.ModuleName, - stakingtypes.ModuleName, - capabilitytypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - vestingtypes.ModuleName, - minttypes.ModuleName, - genutiltypes.ModuleName, - evidencetypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - paramstypes.ModuleName, - upgradetypes.ModuleName, - ibchost.ModuleName, - ibctransfertypes.ModuleName, - profiletypes.ModuleName, - rewardtypes.ModuleName, - campaigntypes.ModuleName, - monitoringctypes.ModuleName, - monitoringptypes.ModuleName, - participationtypes.ModuleName, - launchtypes.ModuleName, - ) - - // NOTE: The genutils module must occur after staking so that pools are - // properly initialized with tokens from genesis accounts. - // NOTE: Capability module must occur first so that it can initialize any capabilities - // so that other modules that want to create or claim capabilities afterwards in InitChain - // can do so safely. - app.mm.SetOrderInitGenesis( - capabilitytypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - claimtypes.ModuleName, - stakingtypes.ModuleName, - vestingtypes.ModuleName, - slashingtypes.ModuleName, - govtypes.ModuleName, - minttypes.ModuleName, - crisistypes.ModuleName, - ibchost.ModuleName, - genutiltypes.ModuleName, - evidencetypes.ModuleName, - paramstypes.ModuleName, - upgradetypes.ModuleName, - ibctransfertypes.ModuleName, - authz.ModuleName, - feegrant.ModuleName, - profiletypes.ModuleName, - launchtypes.ModuleName, - campaigntypes.ModuleName, - monitoringctypes.ModuleName, - monitoringptypes.ModuleName, - rewardtypes.ModuleName, - fundraisingtypes.ModuleName, - participationtypes.ModuleName, - // this line is used by starport scaffolding # stargate/app/initGenesis - ) - - app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) - app.mm.RegisterServices(module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())) - - // create the simulation manager and define the order of the modules for deterministic simulations - app.sm = module.NewSimulationManager( - auth.NewAppModule(appCodec, app.AuthKeeper, authsims.RandomGenesisAccounts), - bank.NewAppModule(appCodec, app.BankKeeper, app.AuthKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - feegrantmodule.NewAppModule(appCodec, app.AuthKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AuthKeeper, app.BankKeeper, app.interfaceRegistry), - gov.NewAppModule(appCodec, app.GovKeeper, app.AuthKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AuthKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AuthKeeper, app.BankKeeper, app.StakingKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AuthKeeper, app.BankKeeper, app.StakingKeeper), - params.NewAppModule(app.ParamsKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - ibc.NewAppModule(app.IBCKeeper), - app.transferModule, - profile.NewAppModule(appCodec, app.ProfileKeeper, app.AuthKeeper, app.BankKeeper), - launch.NewAppModule(appCodec, app.LaunchKeeper, app.AuthKeeper, app.BankKeeper), - campaign.NewAppModule(appCodec, app.CampaignKeeper, app.AuthKeeper, app.BankKeeper, app.ProfileKeeper), - reward.NewAppModule(appCodec, app.RewardKeeper, app.AuthKeeper, app.BankKeeper), - participation.NewAppModule(appCodec, app.ParticipationKeeper, app.AuthKeeper, app.BankKeeper, app.FundraisingKeeper), - fundraising.NewAppModule(appCodec, app.FundraisingKeeper, app.AuthKeeper, app.BankKeeper, app.DistrKeeper), - monitoringpModule, - claim.NewAppModule(appCodec, app.ClaimKeeper, app.AuthKeeper, app.BankKeeper), - ) - app.sm.RegisterStoreDecoders() - - // initialize stores - app.MountKVStores(keys) - app.MountTransientStores(tkeys) - app.MountMemoryStores(memKeys) - - // initialize BaseApp - app.SetInitChainer(app.InitChainer) - app.SetBeginBlocker(app.BeginBlocker) - - anteHandler, err := ante.NewAnteHandler( - ante.HandlerOptions{ - AccountKeeper: app.AuthKeeper, - BankKeeper: app.BankKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - FeegrantKeeper: app.FeeGrantKeeper, - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - }, - ) - if err != nil { - panic(err) - } - - app.SetAnteHandler(anteHandler) - app.SetEndBlocker(app.EndBlocker) - - if loadLatest { - if err := app.LoadLatestVersion(); err != nil { - tmos.Exit(err.Error()) - } - } - - app.ScopedIBCKeeper = scopedIBCKeeper - app.ScopedTransferKeeper = scopedTransferKeeper - // this line is used by starport scaffolding # stargate/app/beforeInitReturn - - return app -} - -// Name returns the name of the App -func (app *App) Name() string { return app.BaseApp.Name() } - -// GetBaseApp returns the base app of the application -func (app App) GetBaseApp() *baseapp.BaseApp { return app.BaseApp } - -// BeginBlocker application updates every begin block -func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - return app.mm.BeginBlock(ctx, req) -} - -// EndBlocker application updates every end block -func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.mm.EndBlock(ctx, req) -} - -// InitChainer application update at chain initialization -func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { - var genesisState GenesisState - if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { - panic(err) - } - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) -} - -// LoadHeight loads a particular height -func (app *App) LoadHeight(height int64) error { - return app.LoadVersion(height) -} - -// ModuleAccountAddrs returns all the app's module account addresses. -func (app *App) ModuleAccountAddrs() map[string]bool { - modAccAddrs := make(map[string]bool) - for acc := range maccPerms { - modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true - } - - return modAccAddrs -} - -// LegacyAmino returns SimApp's amino codec. -// -// 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 *App) LegacyAmino() *codec.LegacyAmino { - return app.cdc -} - -// AppCodec returns spn's app codec. -// -// 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 *App) AppCodec() codec.Codec { - return app.appCodec -} - -// InterfaceRegistry returns spn's InterfaceRegistry -func (app *App) InterfaceRegistry() types.InterfaceRegistry { - return app.interfaceRegistry -} - -// GetKey returns the KVStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey { - return app.keys[storeKey] -} - -// GetTKey returns the TransientStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *App) GetTKey(storeKey string) *storetypes.TransientStoreKey { - return app.tkeys[storeKey] -} - -// GetMemKey returns the MemStoreKey for the provided mem key. -// -// NOTE: This is solely used for testing purposes. -func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { - return app.memKeys[storeKey] -} - -// GetSubspace returns a param subspace for a given module name. -// -// NOTE: This is solely to be used for testing purposes. -func (app *App) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// RegisterAPIRoutes registers all application module routes with the provided -// API server. -func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { - clientCtx := apiSvr.ClientCtx - // 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 grpc-gateway routes for all modules. - ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - - // register app's OpenAPI routes. - apiSvr.Router.Handle("/static/openapi.yml", http.FileServer(http.FS(docs.Docs))) - // apiSvr.Router.HandleFunc("/", openapiconsole.Handler(spntypes.Name, "/static/openapi.yml")) -} - -// RegisterTxService implements the Application.RegisterTxService method. -func (app *App) RegisterTxService(clientCtx client.Context) { - authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) -} - -// RegisterTendermintService implements the Application.RegisterTendermintService method. -func (app *App) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService( - clientCtx, - app.BaseApp.GRPCQueryRouter(), - app.interfaceRegistry, - app.Query, - ) -} - -// GetMaccPerms returns a copy of the module account permissions -func GetMaccPerms() map[string][]string { - dupMaccPerms := make(map[string][]string) - for k, v := range maccPerms { - dupMaccPerms[k] = v - } - return dupMaccPerms -} - -// initParamsKeeper init params keeper and its subspaces -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) - paramsKeeper.Subspace(banktypes.ModuleName) - paramsKeeper.Subspace(stakingtypes.ModuleName) - paramsKeeper.Subspace(minttypes.ModuleName) - paramsKeeper.Subspace(distrtypes.ModuleName) - paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) - paramsKeeper.Subspace(crisistypes.ModuleName) - paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(ibchost.ModuleName) - paramsKeeper.Subspace(profiletypes.ModuleName) - paramsKeeper.Subspace(launchtypes.ModuleName) - paramsKeeper.Subspace(campaigntypes.ModuleName) - paramsKeeper.Subspace(monitoringctypes.ModuleName) - paramsKeeper.Subspace(monitoringptypes.ModuleName) - paramsKeeper.Subspace(rewardtypes.ModuleName) - paramsKeeper.Subspace(fundraisingtypes.ModuleName) - paramsKeeper.Subspace(participationtypes.ModuleName) - paramsKeeper.Subspace(claimtypes.ModuleName) - // this line is used by starport scaffolding # stargate/app/paramSubspace - - return paramsKeeper -} - -// SimulationManager implements the SimulationApp interface -func (app *App) SimulationManager() *module.SimulationManager { - return app.sm -} - -func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry { return nil } -func (app *App) TxConfig() client.TxConfig { return nil } -func (app *App) AutoCliOpts() autocli.AppOptions { return autocli.AppOptions{} } - -// GetKey returns the KVStoreKey for the provided store key. -func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey { - sk := app.UnsafeFindStoreKey(storeKey) - kvStoreKey, ok := sk.(*storetypes.KVStoreKey) - if !ok { - return nil - } - return kvStoreKey -} - -// GetMemKey returns the MemoryStoreKey for the provided store key. -func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { - key, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.MemoryStoreKey) - if !ok { - return nil - } - - return key -} - -// kvStoreKeys returns all the kv store keys registered inside App. -func (app *App) kvStoreKeys() map[string]*storetypes.KVStoreKey { - keys := make(map[string]*storetypes.KVStoreKey) - for _, k := range app.GetStoreKeys() { - if kv, ok := k.(*storetypes.KVStoreKey); ok { - keys[kv.Name()] = kv - } - } - - return keys -} - -// GetSubspace returns a param subspace for a given module name. -func (app *App) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// SimulationManager implements the SimulationApp interface -func (app *App) SimulationManager() *module.SimulationManager { - return app.sm -} - -// RegisterAPIRoutes registers all application module routes with the provided -// API server. -func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { - app.App.RegisterAPIRoutes(apiSvr, apiConfig) - // register swagger API in app.go so that other applications can override easily - if err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil { - panic(err) - } -} - -// GetMaccPerms returns a copy of the module account permissions -// -// NOTE: This is solely to be used for testing purposes. -func GetMaccPerms() map[string][]string { - dup := make(map[string][]string) - for _, perms := range moduleAccPerms { - dup[perms.Account] = perms.Permissions - } - - return dup -} - -// BlockedAddresses returns all the app's blocked account addresses. -func BlockedAddresses() map[string]bool { - result := make(map[string]bool) - - if len(blockAccAddrs) > 0 { - for _, addr := range blockAccAddrs { - result[addr] = true - } - } else { - for addr := range GetMaccPerms() { - result[addr] = true - } - } - - return result -} diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/go.mod b/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/go.mod deleted file mode 100644 index ba50cdde55..0000000000 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/go.mod +++ /dev/null @@ -1,343 +0,0 @@ -module github.com/tendermint/spn - -go 1.19 - -require ( - cosmossdk.io/api v0.3.1 - cosmossdk.io/errors v1.0.0-beta.7 - cosmossdk.io/math v1.0.1 - github.com/aws/smithy-go v1.8.0 - github.com/bufbuild/buf v1.32.1 - github.com/cometbft/cometbft v0.37.2 - github.com/cometbft/cometbft-db v0.8.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.2 - github.com/cosmos/cosmos-sdk v0.47.3 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.2.0 - github.com/gogo/protobuf v1.3.2 - github.com/golang/protobuf v1.5.4 - github.com/golangci/golangci-lint v1.50.1 - github.com/gorilla/mux v1.8.0 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 - github.com/ignite/modules v0.0.2 - github.com/pkg/errors v0.9.1 - github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.8.0 - github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.9.0 - github.com/tendermint/fundraising v0.4.1 - golang.org/x/tools v0.21.0 - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 - google.golang.org/grpc v1.64.0 - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 - google.golang.org/protobuf v1.34.1 - gopkg.in/yaml.v2 v2.4.0 - mvdan.cc/gofumpt v0.5.0 -) - -replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - -require ( - 4d63.com/gochecknoglobals v0.1.0 // indirect - cloud.google.com/go v0.112.1 // indirect - cloud.google.com/go/compute v1.25.1 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.6 // indirect - cloud.google.com/go/storage v1.38.0 // indirect - cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/log v1.1.0 // indirect - cosmossdk.io/simapp v0.0.0-20230323161446-0af178d721ff // indirect - cosmossdk.io/tools/rosetta v0.2.1 // indirect - filippo.io/edwards25519 v1.0.0 // indirect - github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect - github.com/Abirdcfly/dupword v0.0.7 // indirect - github.com/Antonboom/errname v0.1.7 // indirect - github.com/Antonboom/nilnil v0.1.1 // indirect - github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect - github.com/BurntSushi/toml v1.2.1 // indirect - github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect - github.com/Masterminds/semver v1.5.0 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/OpenPeeDeeP/depguard v1.1.1 // indirect - github.com/alexkohler/prealloc v1.0.0 // indirect - github.com/alingse/asasalint v0.0.11 // indirect - github.com/armon/go-metrics v0.4.1 // indirect - github.com/ashanbrown/forbidigo v1.3.0 // indirect - github.com/ashanbrown/makezero v1.1.1 // indirect - github.com/aws/aws-sdk-go v1.44.244 // 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/bkielbasa/cyclop v1.2.0 // indirect - github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bombsimon/wsl/v3 v3.3.0 // indirect - github.com/breml/bidichk v0.2.3 // indirect - github.com/breml/errchkjson v0.3.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/bufbuild/connect-go v1.8.0 // indirect - github.com/bufbuild/connect-opentelemetry-go v0.3.0 // indirect - github.com/bufbuild/protocompile v0.13.1-0.20240510201809-752249dfc37f // indirect - github.com/butuzov/ireturn v0.1.1 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/charithe/durationcheck v0.0.9 // indirect - github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/chzyer/readline v1.5.1 // indirect - github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect - github.com/confio/ics23/go v0.9.0 // indirect - github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect - github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect - github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect - github.com/creachadair/taskgroup v0.4.2 // indirect - github.com/curioswitch/go-reassign v0.2.0 // indirect - github.com/daixiang0/gci v0.8.1 // indirect - github.com/danieljoos/wincred v1.2.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect - github.com/denis-tingaikin/go-header v0.4.3 // indirect - github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect - github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/cli v26.1.2+incompatible // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v26.1.2+incompatible // indirect - github.com/docker/docker-credential-helpers v0.8.1 // indirect - github.com/docker/go-connections v0.5.0 // indirect - github.com/docker/go-units v0.5.0 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/esimonov/ifshort v1.0.4 // indirect - github.com/ettle/strcase v0.1.1 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/fatih/structtag v1.2.0 // indirect - github.com/felixge/fgprof v0.9.4 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/firefart/nonamedreturns v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-chi/chi/v5 v5.0.12 // indirect - github.com/go-critic/go-critic v0.6.5 // 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.6.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-toolsmith/astcast v1.0.0 // indirect - github.com/go-toolsmith/astcopy v1.0.2 // indirect - github.com/go-toolsmith/astequal v1.0.3 // indirect - github.com/go-toolsmith/astfmt v1.0.0 // indirect - github.com/go-toolsmith/astp v1.0.0 // indirect - github.com/go-toolsmith/strparse v1.0.0 // indirect - github.com/go-toolsmith/typep v1.0.2 // indirect - github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect - github.com/gobwas/glob v0.2.3 // indirect - github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/gofrs/flock v0.8.1 // indirect - github.com/gofrs/uuid/v5 v5.2.0 // indirect - github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/glog v1.2.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/mock v1.6.0 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect - github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect - github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 // indirect - github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect - github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect - github.com/golangci/misspell v0.3.5 // indirect - github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect - github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect - github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/google/go-containerregistry v0.19.1 // indirect - github.com/google/orderedcode v0.0.1 // indirect - github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 // indirect - github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.2 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect - github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/gostaticanalysis/analysisutil v0.7.1 // indirect - github.com/gostaticanalysis/comment v1.4.2 // indirect - github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect - github.com/gostaticanalysis/nilerr v0.1.1 // 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/errwrap v1.1.0 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.1 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-multierror v1.1.1 // 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.1.0 // indirect - github.com/hexops/gotextdiff v1.0.3 // indirect - github.com/huandu/skiplist v1.2.0 // indirect - github.com/improbable-eng/grpc-web v0.15.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 // indirect - github.com/jgautheron/goconst v1.5.1 // indirect - github.com/jingyugao/rowserrcheck v1.1.1 // indirect - github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/jmhodges/levigo v1.0.0 // indirect - github.com/julz/importas v0.1.0 // indirect - github.com/kisielk/errcheck v1.6.2 // indirect - github.com/kisielk/gotool v1.0.0 // indirect - github.com/kkHAIKE/contextcheck v1.1.3 // indirect - github.com/klauspost/compress v1.17.8 // indirect - github.com/klauspost/pgzip v1.2.6 // indirect - github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.6 // indirect - github.com/kyoh86/exportloopref v0.1.8 // indirect - github.com/ldez/gomoddirectives v0.2.3 // indirect - github.com/ldez/tagliatelle v0.3.1 // indirect - github.com/leonklingele/grouper v1.1.0 // indirect - github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.7.16 // indirect - github.com/lufeee/execinquery v1.2.1 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/manifoldco/promptui v0.9.0 // indirect - github.com/maratori/testableexamples v1.0.0 // indirect - github.com/maratori/testpackage v1.1.0 // indirect - github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/revive v1.2.4 // 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/moby/term v0.5.0 // indirect - github.com/moricho/tparallel v0.2.1 // indirect - github.com/morikuni/aec v1.0.0 // indirect - github.com/mtibben/percent v0.2.1 // indirect - github.com/nakabonne/nestif v0.3.1 // indirect - github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect - github.com/nishanths/exhaustive v0.8.3 // indirect - github.com/nishanths/predeclared v0.2.2 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect - github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect - github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect - github.com/pkg/profile v1.7.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.0.5 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect - github.com/quasilyte/go-ruleguard v0.3.18 // indirect - github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f // indirect - github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect - github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/rakyll/statik v0.1.7 // indirect - github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rs/cors v1.11.0 // indirect - github.com/rs/zerolog v1.29.1 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/ryancurrah/gomodguard v1.2.4 // indirect - github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect - github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.20.0 // indirect - github.com/securego/gosec/v2 v2.13.1 // indirect - github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/sivchari/containedctx v1.0.2 // indirect - github.com/sivchari/nosnakecase v1.7.0 // indirect - github.com/sivchari/tenv v1.7.0 // indirect - github.com/sonatard/noctx v0.0.1 // indirect - github.com/sourcegraph/go-diff v0.6.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect - github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect - github.com/stretchr/objx v0.5.2 // indirect - github.com/subosito/gotenv v1.4.2 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tdakkota/asciicheck v0.1.1 // indirect - github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tetafro/godot v1.4.11 // indirect - github.com/tetratelabs/wazero v1.2.1 // indirect - github.com/tidwall/btree v1.6.0 // indirect - github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect - github.com/timonwong/loggercheck v0.9.3 // indirect - github.com/tomarrell/wrapcheck/v2 v2.7.0 // indirect - github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ulikunitz/xz v0.5.11 // indirect - github.com/ultraware/funlen v0.0.3 // indirect - github.com/ultraware/whitespace v0.0.5 // indirect - github.com/uudashr/gocognit v1.0.6 // indirect - github.com/vbatts/tar-split v0.11.5 // indirect - github.com/yagipy/maintidx v1.0.0 // indirect - github.com/yeya24/promlinter v0.2.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - gitlab.com/bosi/decorder v0.2.3 // indirect - go.etcd.io/bbolt v1.3.7 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/api v0.169.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.3.3 // indirect - mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect - mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect - nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.5.5 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect -) diff --git a/ignite/pkg/cosmosanalysis/app/testdata/two_app.go b/ignite/pkg/cosmosanalysis/app/testdata/two_app.go index 31ac29af1a..74c4f719cc 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/two_app.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/two_app.go @@ -1,11 +1,11 @@ package foo import ( + paramstypes "cosmossdk.io/x/params/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" abci "github.com/tendermint/tendermint/abci/types" app "github.com/ignite/cli/v29/ignite/pkg/cosmosanalysis/app/testdata/modules/registration_not_in_app_go" diff --git a/ignite/pkg/cosmosanalysis/cosmosanalysis.go b/ignite/pkg/cosmosanalysis/cosmosanalysis.go index 46e4f2f806..c33fd74497 100644 --- a/ignite/pkg/cosmosanalysis/cosmosanalysis.go +++ b/ignite/pkg/cosmosanalysis/cosmosanalysis.go @@ -25,8 +25,7 @@ const ( var AppImplementation = []string{ "AppCodec", - "GetKey", - "GetMemKey", + "TxConfig", "RegisterAPIRoutes", } diff --git a/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go b/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go index bdd134f5ab..a19ad3ff49 100644 --- a/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go +++ b/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go @@ -26,13 +26,37 @@ import ( vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" + "cosmossdk.io/x/authz" + _ "cosmossdk.io/x/authz/module" // import for side-effects + _ "cosmossdk.io/x/bank" // import for side-effects + banktypes "cosmossdk.io/x/bank/types" _ "cosmossdk.io/x/circuit" // import for side-effects circuittypes "cosmossdk.io/x/circuit/types" + _ "cosmossdk.io/x/consensus" // import for side-effects + consensustypes "cosmossdk.io/x/consensus/types" + _ "cosmossdk.io/x/crisis" // import for side-effects + crisistypes "cosmossdk.io/x/crisis/types" + _ "cosmossdk.io/x/distribution" // import for side-effects + distrtypes "cosmossdk.io/x/distribution/types" _ "cosmossdk.io/x/evidence" // import for side-effects evidencetypes "cosmossdk.io/x/evidence/types" "cosmossdk.io/x/feegrant" _ "cosmossdk.io/x/feegrant/module" // import for side-effects - _ "cosmossdk.io/x/upgrade" // import for side-effects + "cosmossdk.io/x/genutil" + genutiltypes "cosmossdk.io/x/genutil/types" + "cosmossdk.io/x/gov" + govtypes "cosmossdk.io/x/gov/types" + "cosmossdk.io/x/group" + _ "cosmossdk.io/x/group/module" // import for side-effects + _ "cosmossdk.io/x/mint" // import for side-effects + minttypes "cosmossdk.io/x/mint/types" + _ "cosmossdk.io/x/params" // import for side-effects + paramstypes "cosmossdk.io/x/params/types" + _ "cosmossdk.io/x/slashing" // import for side-effects + slashingtypes "cosmossdk.io/x/slashing/types" + _ "cosmossdk.io/x/staking" // import for side-effects + stakingtypes "cosmossdk.io/x/staking/types" + _ "cosmossdk.io/x/upgrade" // import for side-effects upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/types/module" @@ -40,30 +64,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import for side-effects vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/cosmos/cosmos-sdk/x/authz" - _ "github.com/cosmos/cosmos-sdk/x/authz/module" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects - consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - _ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - _ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/cosmos/cosmos-sdk/x/gov" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/cosmos-sdk/x/group" - _ "github.com/cosmos/cosmos-sdk/x/group/module" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - _ "github.com/cosmos/cosmos-sdk/x/params" // import for side-effects - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - _ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" _ "github.com/cosmos/ibc-go/modules/capability" // import for side-effects capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" _ "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" // import for side-effects diff --git a/ignite/pkg/cosmosclient/bank.go b/ignite/pkg/cosmosclient/bank.go index ae9b39ffc6..7efb17a717 100644 --- a/ignite/pkg/cosmosclient/bank.go +++ b/ignite/pkg/cosmosclient/bank.go @@ -3,9 +3,10 @@ package cosmosclient import ( "context" + banktypes "cosmossdk.io/x/bank/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ignite/cli/v29/ignite/pkg/cosmosaccount" ) diff --git a/ignite/pkg/cosmosclient/bank_test.go b/ignite/pkg/cosmosclient/bank_test.go index a3c2a16c86..b4d3377a8b 100644 --- a/ignite/pkg/cosmosclient/bank_test.go +++ b/ignite/pkg/cosmosclient/bank_test.go @@ -5,9 +5,9 @@ import ( "testing" "cosmossdk.io/math" + banktypes "cosmossdk.io/x/bank/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/ignite/pkg/cosmosclient/consensus.go b/ignite/pkg/cosmosclient/consensus.go index e905bb17b6..049f86cd5d 100644 --- a/ignite/pkg/cosmosclient/consensus.go +++ b/ignite/pkg/cosmosclient/consensus.go @@ -5,8 +5,8 @@ import ( "encoding/base64" "time" + tmproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "github.com/cometbft/cometbft/libs/bytes" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" ) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index ba911fa66e..0d65ad754d 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -18,10 +18,15 @@ import ( "github.com/cosmos/gogoproto/proto" prototypes "github.com/cosmos/gogoproto/types" + "cosmossdk.io/core/transaction" + banktypes "cosmossdk.io/x/bank/types" + staking "cosmossdk.io/x/staking/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdktypes "github.com/cosmos/cosmos-sdk/types" @@ -29,8 +34,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - staking "github.com/cosmos/cosmos-sdk/x/staking/types" rpcclient "github.com/cometbft/cometbft/rpc/client" rpchttp "github.com/cometbft/cometbft/rpc/client/http" @@ -82,14 +85,14 @@ type FaucetClient interface { // //go:generate mockery --srcpkg . --name Gasometer --filename gasometer.go --with-expecter type Gasometer interface { - CalculateGas(clientCtx gogogrpc.ClientConn, txf tx.Factory, msgs ...sdktypes.Msg) (*txtypes.SimulateResponse, uint64, error) + CalculateGas(clientCtx gogogrpc.ClientConn, txf tx.Factory, msgs ...transaction.Msg) (*txtypes.SimulateResponse, uint64, error) } // Signer allows to mock the tx.Sign func. // //go:generate mockery --srcpkg . --name Signer --filename signer.go --with-expecter type Signer interface { - Sign(ctx context.Context, txf tx.Factory, name string, txBuilder client.TxBuilder, overwriteSig bool) error + Sign(ctx client.Context, txf tx.Factory, name string, txBuilder client.TxBuilder, overwriteSig bool) error } // Client is a client to access your chain by querying and broadcasting transactions. @@ -305,7 +308,7 @@ func New(ctx context.Context, options ...Option) (Client, error) { } if c.RPC == nil { - if c.RPC, err = rpchttp.New(c.nodeAddress, "/websocket"); err != nil { + if c.RPC, err = rpchttp.New(c.nodeAddress); err != nil { return Client{}, err } } @@ -542,7 +545,7 @@ func (c Client) lockBech32Prefix() (unlockFn func()) { return mconf.Unlock } -func (c Client) BroadcastTx(ctx context.Context, account cosmosaccount.Account, msgs ...sdktypes.Msg) (Response, error) { +func (c Client) BroadcastTx(ctx context.Context, account cosmosaccount.Account, msgs ...transaction.Msg) (Response, error) { txService, err := c.CreateTx(ctx, account, msgs...) if err != nil { return Response{}, err @@ -553,7 +556,7 @@ func (c Client) BroadcastTx(ctx context.Context, account cosmosaccount.Account, // CreateTxWithOptions creates a transaction with the given options. // Options override global client options. -func (c Client) CreateTxWithOptions(ctx context.Context, account cosmosaccount.Account, options TxOptions, msgs ...sdktypes.Msg) (TxService, error) { +func (c Client) CreateTxWithOptions(ctx context.Context, account cosmosaccount.Account, options TxOptions, msgs ...transaction.Msg) (TxService, error) { defer c.lockBech32Prefix()() if c.useFaucet && !c.generateOnly { @@ -624,7 +627,7 @@ func (c Client) CreateTxWithOptions(ctx context.Context, account cosmosaccount.A return TxService{}, errors.WithStack(err) } - txUnsigned.SetFeeGranter(clientCtx.GetFeeGranterAddress()) + txUnsigned.SetFeeGranter(clientCtx.FeeGranter) return TxService{ client: c, @@ -634,7 +637,7 @@ func (c Client) CreateTxWithOptions(ctx context.Context, account cosmosaccount.A }, nil } -func (c Client) CreateTx(ctx context.Context, account cosmosaccount.Account, msgs ...sdktypes.Msg) (TxService, error) { +func (c Client) CreateTx(ctx context.Context, account cosmosaccount.Account, msgs ...transaction.Msg) (TxService, error) { return c.CreateTxWithOptions(ctx, account, TxOptions{}, msgs...) } @@ -811,11 +814,15 @@ func (c *Client) prepareFactory(clientCtx client.Context) (tx.Factory, error) { } func (c Client) newContext() client.Context { + addressCodec := addresscodec.NewBech32Codec(c.addressPrefix) + validatorAddressCodec := addresscodec.NewBech32Codec(c.addressPrefix + "val") + consensusAddressCodec := addresscodec.NewBech32Codec(c.addressPrefix + "cons") + var ( amino = codec.NewLegacyAmino() interfaceRegistry = codectypes.NewInterfaceRegistry() marshaler = codec.NewProtoCodec(interfaceRegistry) - txConfig = authtx.NewTxConfig(marshaler, authtx.DefaultSignModes) + txConfig = authtx.NewTxConfig(marshaler, addressCodec, validatorAddressCodec, authtx.DefaultSignModes) ) authtypes.RegisterInterfaces(interfaceRegistry) @@ -839,7 +846,10 @@ func (c Client) newContext() client.Context { WithClient(c.RPC). WithSkipConfirmation(true). WithKeyring(c.AccountRegistry.Keyring). - WithGenerateOnly(c.generateOnly) + WithGenerateOnly(c.generateOnly). + WithAddressCodec(addressCodec). + WithValidatorAddressCodec(validatorAddressCodec). + WithConsensusAddressCodec(consensusAddressCodec) } func newFactory(clientCtx client.Context) tx.Factory { diff --git a/ignite/pkg/cosmosclient/cosmosclient_test.go b/ignite/pkg/cosmosclient/cosmosclient_test.go index bbad683991..333d4f27f1 100644 --- a/ignite/pkg/cosmosclient/cosmosclient_test.go +++ b/ignite/pkg/cosmosclient/cosmosclient_test.go @@ -10,14 +10,15 @@ import ( "testing" "time" + "cosmossdk.io/core/transaction" "cosmossdk.io/math" + banktypes "cosmossdk.io/x/bank/types" "github.com/cometbft/cometbft/p2p" ctypes "github.com/cometbft/cometbft/rpc/core/types" tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/client/flags" sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -414,7 +415,7 @@ func TestClientCreateTx(t *testing.T) { tests := []struct { name string opts []cosmosclient.Option - msg sdktypes.Msg + msg transaction.Msg expectedJSONTx string expectedError string setup func(s suite) @@ -430,13 +431,13 @@ func TestClientCreateTx(t *testing.T) { { name: "ok: with default values", msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) }, @@ -447,13 +448,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithUseFaucet("localhost:1234", "", 0), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectMakeSureAccountHasToken(sdkaddr.String(), defaultFaucetMinAmount) @@ -466,13 +467,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithUseFaucet("localhost:1234", "", 0), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectMakeSureAccountHasToken(sdkaddr.String(), defaultFaucetMinAmount-1) s.expectPrepareFactory(sdkaddr) @@ -484,13 +485,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithFees("10token"), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"token","amount":"10"}],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"token","amount":"10"}],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) }, @@ -502,13 +503,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGasPrices("3token"), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"token","amount":"900000"}],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"token","amount":"900000"}],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) }, @@ -521,8 +522,8 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGasAdjustment(2.1), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), @@ -538,13 +539,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGas(""), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) s.gasometer.EXPECT(). @@ -558,13 +559,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGas("auto"), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) s.gasometer.EXPECT(). @@ -578,13 +579,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGasAdjustment(2.4), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"300000","payer":"","granter":""},"tip":null},"signatures":[]}`, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) }, @@ -596,13 +597,13 @@ func TestClientCreateTx(t *testing.T) { cosmosclient.WithGasAdjustment(0), }, msg: &banktypes.MsgSend{ - FromAddress: "from", - ToAddress: "to", + FromAddress: "cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x", + ToAddress: "cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv", Amount: sdktypes.NewCoins( sdktypes.NewCoin("token", math.NewIntFromUint64(1)), ), }, - expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"from","to_address":"to","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]} + expectedJSONTx: `{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1aew8dk9cs3uzzgeldatgzvm5ca2k4m98xhy20x","to_address":"cosmos1fhpcsxn0g8uask73xpcgwxlfxtuunn3ey5ptjv","amount":[{"denom":"token","amount":"1"}]}],"memo":"","timeout_height":"0","unordered":false,"timeout_timestamp":"0001-01-01T00:00:00Z","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"20042","payer":"","granter":""},"tip":null},"signatures":[]} `, setup: func(s suite) { s.expectPrepareFactory(sdkaddr) diff --git a/ignite/pkg/cosmosclient/gasometer.go b/ignite/pkg/cosmosclient/gasometer.go index bdf259b36c..79d8b7b248 100644 --- a/ignite/pkg/cosmosclient/gasometer.go +++ b/ignite/pkg/cosmosclient/gasometer.go @@ -3,14 +3,15 @@ package cosmosclient import ( gogogrpc "github.com/cosmos/gogoproto/grpc" + "cosmossdk.io/core/transaction" + "github.com/cosmos/cosmos-sdk/client/tx" - sdktypes "github.com/cosmos/cosmos-sdk/types" txtypes "github.com/cosmos/cosmos-sdk/types/tx" ) // gasometer implements the Gasometer interface. type gasometer struct{} -func (gasometer) CalculateGas(clientCtx gogogrpc.ClientConn, txf tx.Factory, msgs ...sdktypes.Msg) (*txtypes.SimulateResponse, uint64, error) { +func (gasometer) CalculateGas(clientCtx gogogrpc.ClientConn, txf tx.Factory, msgs ...transaction.Msg) (*txtypes.SimulateResponse, uint64, error) { return tx.CalculateGas(clientCtx, txf, msgs...) } diff --git a/ignite/pkg/cosmosclient/mocks/account_retriever.go b/ignite/pkg/cosmosclient/mocks/account_retriever.go index a254433416..3a8ac632a6 100644 --- a/ignite/pkg/cosmosclient/mocks/account_retriever.go +++ b/ignite/pkg/cosmosclient/mocks/account_retriever.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks @@ -26,6 +26,10 @@ func (_m *AccountRetriever) EXPECT() *AccountRetriever_Expecter { func (_m *AccountRetriever) EnsureExists(clientCtx client.Context, addr types.AccAddress) error { ret := _m.Called(clientCtx, addr) + if len(ret) == 0 { + panic("no return value specified for EnsureExists") + } + var r0 error if rf, ok := ret.Get(0).(func(client.Context, types.AccAddress) error); ok { r0 = rf(clientCtx, addr) @@ -69,6 +73,10 @@ func (_c *AccountRetriever_EnsureExists_Call) RunAndReturn(run func(client.Conte func (_m *AccountRetriever) GetAccount(clientCtx client.Context, addr types.AccAddress) (client.Account, error) { ret := _m.Called(clientCtx, addr) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 client.Account var r1 error if rf, ok := ret.Get(0).(func(client.Context, types.AccAddress) (client.Account, error)); ok { @@ -124,6 +132,10 @@ func (_c *AccountRetriever_GetAccount_Call) RunAndReturn(run func(client.Context func (_m *AccountRetriever) GetAccountNumberSequence(clientCtx client.Context, addr types.AccAddress) (uint64, uint64, error) { ret := _m.Called(clientCtx, addr) + if len(ret) == 0 { + panic("no return value specified for GetAccountNumberSequence") + } + var r0 uint64 var r1 uint64 var r2 error @@ -184,6 +196,10 @@ func (_c *AccountRetriever_GetAccountNumberSequence_Call) RunAndReturn(run func( func (_m *AccountRetriever) GetAccountWithHeight(clientCtx client.Context, addr types.AccAddress) (client.Account, int64, error) { ret := _m.Called(clientCtx, addr) + if len(ret) == 0 { + panic("no return value specified for GetAccountWithHeight") + } + var r0 client.Account var r1 int64 var r2 error diff --git a/ignite/pkg/cosmosclient/mocks/bank_query_client.go b/ignite/pkg/cosmosclient/mocks/bank_query_client.go index 4bb1c72d58..b7110f3928 100644 --- a/ignite/pkg/cosmosclient/mocks/bank_query_client.go +++ b/ignite/pkg/cosmosclient/mocks/bank_query_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks @@ -9,7 +9,7 @@ import ( mock "github.com/stretchr/testify/mock" - types "github.com/cosmos/cosmos-sdk/x/bank/types" + types "cosmossdk.io/x/bank/types" ) // BankQueryClient is an autogenerated mock type for the QueryClient type @@ -36,6 +36,10 @@ func (_m *BankQueryClient) AllBalances(ctx context.Context, in *types.QueryAllBa _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AllBalances") + } + var r0 *types.QueryAllBalancesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllBalancesRequest, ...grpc.CallOption) (*types.QueryAllBalancesResponse, error)); ok { @@ -106,6 +110,10 @@ func (_m *BankQueryClient) Balance(ctx context.Context, in *types.QueryBalanceRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Balance") + } + var r0 *types.QueryBalanceResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryBalanceRequest, ...grpc.CallOption) (*types.QueryBalanceResponse, error)); ok { @@ -176,6 +184,10 @@ func (_m *BankQueryClient) DenomMetadata(ctx context.Context, in *types.QueryDen _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomMetadata") + } + var r0 *types.QueryDenomMetadataResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomMetadataRequest, ...grpc.CallOption) (*types.QueryDenomMetadataResponse, error)); ok { @@ -246,6 +258,10 @@ func (_m *BankQueryClient) DenomMetadataByQueryString(ctx context.Context, in *t _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomMetadataByQueryString") + } + var r0 *types.QueryDenomMetadataByQueryStringResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomMetadataByQueryStringRequest, ...grpc.CallOption) (*types.QueryDenomMetadataByQueryStringResponse, error)); ok { @@ -316,6 +332,10 @@ func (_m *BankQueryClient) DenomOwners(ctx context.Context, in *types.QueryDenom _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomOwners") + } + var r0 *types.QueryDenomOwnersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomOwnersRequest, ...grpc.CallOption) (*types.QueryDenomOwnersResponse, error)); ok { @@ -386,6 +406,10 @@ func (_m *BankQueryClient) DenomOwnersByQuery(ctx context.Context, in *types.Que _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomOwnersByQuery") + } + var r0 *types.QueryDenomOwnersByQueryResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomOwnersByQueryRequest, ...grpc.CallOption) (*types.QueryDenomOwnersByQueryResponse, error)); ok { @@ -456,6 +480,10 @@ func (_m *BankQueryClient) DenomsMetadata(ctx context.Context, in *types.QueryDe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomsMetadata") + } + var r0 *types.QueryDenomsMetadataResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomsMetadataRequest, ...grpc.CallOption) (*types.QueryDenomsMetadataResponse, error)); ok { @@ -526,6 +554,10 @@ func (_m *BankQueryClient) Params(ctx context.Context, in *types.QueryParamsRequ _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 *types.QueryParamsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)); ok { @@ -596,6 +628,10 @@ func (_m *BankQueryClient) SendEnabled(ctx context.Context, in *types.QuerySendE _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SendEnabled") + } + var r0 *types.QuerySendEnabledResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QuerySendEnabledRequest, ...grpc.CallOption) (*types.QuerySendEnabledResponse, error)); ok { @@ -666,6 +702,10 @@ func (_m *BankQueryClient) SpendableBalanceByDenom(ctx context.Context, in *type _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SpendableBalanceByDenom") + } + var r0 *types.QuerySpendableBalanceByDenomResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QuerySpendableBalanceByDenomRequest, ...grpc.CallOption) (*types.QuerySpendableBalanceByDenomResponse, error)); ok { @@ -736,6 +776,10 @@ func (_m *BankQueryClient) SpendableBalances(ctx context.Context, in *types.Quer _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SpendableBalances") + } + var r0 *types.QuerySpendableBalancesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QuerySpendableBalancesRequest, ...grpc.CallOption) (*types.QuerySpendableBalancesResponse, error)); ok { @@ -806,6 +850,10 @@ func (_m *BankQueryClient) SupplyOf(ctx context.Context, in *types.QuerySupplyOf _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SupplyOf") + } + var r0 *types.QuerySupplyOfResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QuerySupplyOfRequest, ...grpc.CallOption) (*types.QuerySupplyOfResponse, error)); ok { @@ -876,6 +924,10 @@ func (_m *BankQueryClient) TotalSupply(ctx context.Context, in *types.QueryTotal _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for TotalSupply") + } + var r0 *types.QueryTotalSupplyResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryTotalSupplyRequest, ...grpc.CallOption) (*types.QueryTotalSupplyResponse, error)); ok { diff --git a/ignite/pkg/cosmosclient/mocks/faucet_client.go b/ignite/pkg/cosmosclient/mocks/faucet_client.go index b9581815b9..a91170eb06 100644 --- a/ignite/pkg/cosmosclient/mocks/faucet_client.go +++ b/ignite/pkg/cosmosclient/mocks/faucet_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *FaucetClient) EXPECT() *FaucetClient_Expecter { func (_m *FaucetClient) Transfer(_a0 context.Context, _a1 cosmosfaucet.TransferRequest) (cosmosfaucet.TransferResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Transfer") + } + var r0 cosmosfaucet.TransferResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, cosmosfaucet.TransferRequest) (cosmosfaucet.TransferResponse, error)); ok { diff --git a/ignite/pkg/cosmosclient/mocks/rpc_client.go b/ignite/pkg/cosmosclient/mocks/rpc_client.go index 8de5a98e44..8126a691b2 100644 --- a/ignite/pkg/cosmosclient/mocks/rpc_client.go +++ b/ignite/pkg/cosmosclient/mocks/rpc_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks @@ -30,17 +30,21 @@ func (_m *RPCClient) EXPECT() *RPCClient_Expecter { return &RPCClient_Expecter{mock: &_m.Mock} } -// ABCIInfo provides a mock function with given fields: _a0 -func (_m *RPCClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { - ret := _m.Called(_a0) +// ABCIInfo provides a mock function with given fields: ctx +func (_m *RPCClient) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for ABCIInfo") + } var r0 *coretypes.ResultABCIInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { - return rf(_a0) + return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultABCIInfo); ok { - r0 = rf(_a0) + r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultABCIInfo) @@ -48,7 +52,7 @@ func (_m *RPCClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, e } if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + r1 = rf(ctx) } else { r1 = ret.Error(1) } @@ -62,12 +66,12 @@ type RPCClient_ABCIInfo_Call struct { } // ABCIInfo is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RPCClient_Expecter) ABCIInfo(_a0 interface{}) *RPCClient_ABCIInfo_Call { - return &RPCClient_ABCIInfo_Call{Call: _e.mock.On("ABCIInfo", _a0)} +// - ctx context.Context +func (_e *RPCClient_Expecter) ABCIInfo(ctx interface{}) *RPCClient_ABCIInfo_Call { + return &RPCClient_ABCIInfo_Call{Call: _e.mock.On("ABCIInfo", ctx)} } -func (_c *RPCClient_ABCIInfo_Call) Run(run func(_a0 context.Context)) *RPCClient_ABCIInfo_Call { +func (_c *RPCClient_ABCIInfo_Call) Run(run func(ctx context.Context)) *RPCClient_ABCIInfo_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) @@ -88,6 +92,10 @@ func (_c *RPCClient_ABCIInfo_Call) RunAndReturn(run func(context.Context) (*core func (_m *RPCClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) + if len(ret) == 0 { + panic("no return value specified for ABCIQuery") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { @@ -144,6 +152,10 @@ func (_c *RPCClient_ABCIQuery_Call) RunAndReturn(run func(context.Context, strin func (_m *RPCClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) + if len(ret) == 0 { + panic("no return value specified for ABCIQueryWithOptions") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { @@ -201,6 +213,10 @@ func (_c *RPCClient_ABCIQueryWithOptions_Call) RunAndReturn(run func(context.Con func (_m *RPCClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { @@ -256,6 +272,10 @@ func (_c *RPCClient_Block_Call) RunAndReturn(run func(context.Context, *int64) ( func (_m *RPCClient) BlockByHash(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for BlockByHash") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, []byte) (*coretypes.ResultBlock, error)); ok { @@ -311,6 +331,10 @@ func (_c *RPCClient_BlockByHash_Call) RunAndReturn(run func(context.Context, []b func (_m *RPCClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for BlockResults") + } + var r0 *coretypes.ResultBlockResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { @@ -366,6 +390,10 @@ func (_c *RPCClient_BlockResults_Call) RunAndReturn(run func(context.Context, *i func (_m *RPCClient) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for BlockSearch") + } + var r0 *coretypes.ResultBlockSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { @@ -424,6 +452,10 @@ func (_c *RPCClient_BlockSearch_Call) RunAndReturn(run func(context.Context, str func (_m *RPCClient) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) + if len(ret) == 0 { + panic("no return value specified for BlockchainInfo") + } + var r0 *coretypes.ResultBlockchainInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { @@ -476,17 +508,21 @@ func (_c *RPCClient_BlockchainInfo_Call) RunAndReturn(run func(context.Context, return _c } -// BroadcastEvidence provides a mock function with given fields: _a0, _a1 -func (_m *RPCClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { - ret := _m.Called(_a0, _a1) +// BroadcastEvidence provides a mock function with given fields: ctx, ev +func (_m *RPCClient) BroadcastEvidence(ctx context.Context, ev types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { + ret := _m.Called(ctx, ev) + + if len(ret) == 0 { + panic("no return value specified for BroadcastEvidence") + } var r0 *coretypes.ResultBroadcastEvidence var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { - return rf(_a0, _a1) + return rf(ctx, ev) } if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) *coretypes.ResultBroadcastEvidence); ok { - r0 = rf(_a0, _a1) + r0 = rf(ctx, ev) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultBroadcastEvidence) @@ -494,7 +530,7 @@ func (_m *RPCClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) } if rf, ok := ret.Get(1).(func(context.Context, types.Evidence) error); ok { - r1 = rf(_a0, _a1) + r1 = rf(ctx, ev) } else { r1 = ret.Error(1) } @@ -508,13 +544,13 @@ type RPCClient_BroadcastEvidence_Call struct { } // BroadcastEvidence is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Evidence -func (_e *RPCClient_Expecter) BroadcastEvidence(_a0 interface{}, _a1 interface{}) *RPCClient_BroadcastEvidence_Call { - return &RPCClient_BroadcastEvidence_Call{Call: _e.mock.On("BroadcastEvidence", _a0, _a1)} +// - ctx context.Context +// - ev types.Evidence +func (_e *RPCClient_Expecter) BroadcastEvidence(ctx interface{}, ev interface{}) *RPCClient_BroadcastEvidence_Call { + return &RPCClient_BroadcastEvidence_Call{Call: _e.mock.On("BroadcastEvidence", ctx, ev)} } -func (_c *RPCClient_BroadcastEvidence_Call) Run(run func(_a0 context.Context, _a1 types.Evidence)) *RPCClient_BroadcastEvidence_Call { +func (_c *RPCClient_BroadcastEvidence_Call) Run(run func(ctx context.Context, ev types.Evidence)) *RPCClient_BroadcastEvidence_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(types.Evidence)) }) @@ -531,17 +567,21 @@ func (_c *RPCClient_BroadcastEvidence_Call) RunAndReturn(run func(context.Contex return _c } -// BroadcastTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *RPCClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { - ret := _m.Called(_a0, _a1) +// BroadcastTxAsync provides a mock function with given fields: ctx, tx +func (_m *RPCClient) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error) { + ret := _m.Called(ctx, tx) + + if len(ret) == 0 { + panic("no return value specified for BroadcastTxAsync") + } var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { - return rf(_a0, _a1) + return rf(ctx, tx) } if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { - r0 = rf(_a0, _a1) + r0 = rf(ctx, tx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) @@ -549,7 +589,7 @@ func (_m *RPCClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coret } if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) + r1 = rf(ctx, tx) } else { r1 = ret.Error(1) } @@ -563,13 +603,13 @@ type RPCClient_BroadcastTxAsync_Call struct { } // BroadcastTxAsync is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *RPCClient_Expecter) BroadcastTxAsync(_a0 interface{}, _a1 interface{}) *RPCClient_BroadcastTxAsync_Call { - return &RPCClient_BroadcastTxAsync_Call{Call: _e.mock.On("BroadcastTxAsync", _a0, _a1)} +// - ctx context.Context +// - tx types.Tx +func (_e *RPCClient_Expecter) BroadcastTxAsync(ctx interface{}, tx interface{}) *RPCClient_BroadcastTxAsync_Call { + return &RPCClient_BroadcastTxAsync_Call{Call: _e.mock.On("BroadcastTxAsync", ctx, tx)} } -func (_c *RPCClient_BroadcastTxAsync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RPCClient_BroadcastTxAsync_Call { +func (_c *RPCClient_BroadcastTxAsync_Call) Run(run func(ctx context.Context, tx types.Tx)) *RPCClient_BroadcastTxAsync_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(types.Tx)) }) @@ -586,17 +626,21 @@ func (_c *RPCClient_BroadcastTxAsync_Call) RunAndReturn(run func(context.Context return _c } -// BroadcastTxCommit provides a mock function with given fields: _a0, _a1 -func (_m *RPCClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { - ret := _m.Called(_a0, _a1) +// BroadcastTxCommit provides a mock function with given fields: ctx, tx +func (_m *RPCClient) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { + ret := _m.Called(ctx, tx) + + if len(ret) == 0 { + panic("no return value specified for BroadcastTxCommit") + } var r0 *coretypes.ResultBroadcastTxCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { - return rf(_a0, _a1) + return rf(ctx, tx) } if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTxCommit); ok { - r0 = rf(_a0, _a1) + r0 = rf(ctx, tx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultBroadcastTxCommit) @@ -604,7 +648,7 @@ func (_m *RPCClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*core } if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) + r1 = rf(ctx, tx) } else { r1 = ret.Error(1) } @@ -618,13 +662,13 @@ type RPCClient_BroadcastTxCommit_Call struct { } // BroadcastTxCommit is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *RPCClient_Expecter) BroadcastTxCommit(_a0 interface{}, _a1 interface{}) *RPCClient_BroadcastTxCommit_Call { - return &RPCClient_BroadcastTxCommit_Call{Call: _e.mock.On("BroadcastTxCommit", _a0, _a1)} +// - ctx context.Context +// - tx types.Tx +func (_e *RPCClient_Expecter) BroadcastTxCommit(ctx interface{}, tx interface{}) *RPCClient_BroadcastTxCommit_Call { + return &RPCClient_BroadcastTxCommit_Call{Call: _e.mock.On("BroadcastTxCommit", ctx, tx)} } -func (_c *RPCClient_BroadcastTxCommit_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RPCClient_BroadcastTxCommit_Call { +func (_c *RPCClient_BroadcastTxCommit_Call) Run(run func(ctx context.Context, tx types.Tx)) *RPCClient_BroadcastTxCommit_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(types.Tx)) }) @@ -641,17 +685,21 @@ func (_c *RPCClient_BroadcastTxCommit_Call) RunAndReturn(run func(context.Contex return _c } -// BroadcastTxSync provides a mock function with given fields: _a0, _a1 -func (_m *RPCClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { - ret := _m.Called(_a0, _a1) +// BroadcastTxSync provides a mock function with given fields: ctx, tx +func (_m *RPCClient) BroadcastTxSync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error) { + ret := _m.Called(ctx, tx) + + if len(ret) == 0 { + panic("no return value specified for BroadcastTxSync") + } var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { - return rf(_a0, _a1) + return rf(ctx, tx) } if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { - r0 = rf(_a0, _a1) + r0 = rf(ctx, tx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) @@ -659,7 +707,7 @@ func (_m *RPCClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*corety } if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) + r1 = rf(ctx, tx) } else { r1 = ret.Error(1) } @@ -673,13 +721,13 @@ type RPCClient_BroadcastTxSync_Call struct { } // BroadcastTxSync is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *RPCClient_Expecter) BroadcastTxSync(_a0 interface{}, _a1 interface{}) *RPCClient_BroadcastTxSync_Call { - return &RPCClient_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", _a0, _a1)} +// - ctx context.Context +// - tx types.Tx +func (_e *RPCClient_Expecter) BroadcastTxSync(ctx interface{}, tx interface{}) *RPCClient_BroadcastTxSync_Call { + return &RPCClient_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", ctx, tx)} } -func (_c *RPCClient_BroadcastTxSync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RPCClient_BroadcastTxSync_Call { +func (_c *RPCClient_BroadcastTxSync_Call) Run(run func(ctx context.Context, tx types.Tx)) *RPCClient_BroadcastTxSync_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(types.Tx)) }) @@ -696,17 +744,21 @@ func (_c *RPCClient_BroadcastTxSync_Call) RunAndReturn(run func(context.Context, return _c } -// CheckTx provides a mock function with given fields: _a0, _a1 -func (_m *RPCClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { - ret := _m.Called(_a0, _a1) +// CheckTx provides a mock function with given fields: ctx, tx +func (_m *RPCClient) CheckTx(ctx context.Context, tx types.Tx) (*coretypes.ResultCheckTx, error) { + ret := _m.Called(ctx, tx) + + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } var r0 *coretypes.ResultCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { - return rf(_a0, _a1) + return rf(ctx, tx) } if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultCheckTx); ok { - r0 = rf(_a0, _a1) + r0 = rf(ctx, tx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultCheckTx) @@ -714,7 +766,7 @@ func (_m *RPCClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.Resu } if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) + r1 = rf(ctx, tx) } else { r1 = ret.Error(1) } @@ -728,13 +780,13 @@ type RPCClient_CheckTx_Call struct { } // CheckTx is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *RPCClient_Expecter) CheckTx(_a0 interface{}, _a1 interface{}) *RPCClient_CheckTx_Call { - return &RPCClient_CheckTx_Call{Call: _e.mock.On("CheckTx", _a0, _a1)} +// - ctx context.Context +// - tx types.Tx +func (_e *RPCClient_Expecter) CheckTx(ctx interface{}, tx interface{}) *RPCClient_CheckTx_Call { + return &RPCClient_CheckTx_Call{Call: _e.mock.On("CheckTx", ctx, tx)} } -func (_c *RPCClient_CheckTx_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RPCClient_CheckTx_Call { +func (_c *RPCClient_CheckTx_Call) Run(run func(ctx context.Context, tx types.Tx)) *RPCClient_CheckTx_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(types.Tx)) }) @@ -755,6 +807,10 @@ func (_c *RPCClient_CheckTx_Call) RunAndReturn(run func(context.Context, types.T func (_m *RPCClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *coretypes.ResultCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { @@ -810,6 +866,10 @@ func (_c *RPCClient_Commit_Call) RunAndReturn(run func(context.Context, *int64) func (_m *RPCClient) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for ConsensusParams") + } + var r0 *coretypes.ResultConsensusParams var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { @@ -861,17 +921,21 @@ func (_c *RPCClient_ConsensusParams_Call) RunAndReturn(run func(context.Context, return _c } -// ConsensusState provides a mock function with given fields: _a0 -func (_m *RPCClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { - ret := _m.Called(_a0) +// ConsensusState provides a mock function with given fields: ctx +func (_m *RPCClient) ConsensusState(ctx context.Context) (*coretypes.ResultConsensusState, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for ConsensusState") + } var r0 *coretypes.ResultConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { - return rf(_a0) + return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultConsensusState); ok { - r0 = rf(_a0) + r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultConsensusState) @@ -879,7 +943,7 @@ func (_m *RPCClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConse } if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + r1 = rf(ctx) } else { r1 = ret.Error(1) } @@ -893,12 +957,12 @@ type RPCClient_ConsensusState_Call struct { } // ConsensusState is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RPCClient_Expecter) ConsensusState(_a0 interface{}) *RPCClient_ConsensusState_Call { - return &RPCClient_ConsensusState_Call{Call: _e.mock.On("ConsensusState", _a0)} +// - ctx context.Context +func (_e *RPCClient_Expecter) ConsensusState(ctx interface{}) *RPCClient_ConsensusState_Call { + return &RPCClient_ConsensusState_Call{Call: _e.mock.On("ConsensusState", ctx)} } -func (_c *RPCClient_ConsensusState_Call) Run(run func(_a0 context.Context)) *RPCClient_ConsensusState_Call { +func (_c *RPCClient_ConsensusState_Call) Run(run func(ctx context.Context)) *RPCClient_ConsensusState_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) @@ -915,17 +979,21 @@ func (_c *RPCClient_ConsensusState_Call) RunAndReturn(run func(context.Context) return _c } -// DumpConsensusState provides a mock function with given fields: _a0 -func (_m *RPCClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { - ret := _m.Called(_a0) +// DumpConsensusState provides a mock function with given fields: ctx +func (_m *RPCClient) DumpConsensusState(ctx context.Context) (*coretypes.ResultDumpConsensusState, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for DumpConsensusState") + } var r0 *coretypes.ResultDumpConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { - return rf(_a0) + return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultDumpConsensusState); ok { - r0 = rf(_a0) + r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultDumpConsensusState) @@ -933,7 +1001,7 @@ func (_m *RPCClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultD } if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + r1 = rf(ctx) } else { r1 = ret.Error(1) } @@ -947,12 +1015,12 @@ type RPCClient_DumpConsensusState_Call struct { } // DumpConsensusState is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RPCClient_Expecter) DumpConsensusState(_a0 interface{}) *RPCClient_DumpConsensusState_Call { - return &RPCClient_DumpConsensusState_Call{Call: _e.mock.On("DumpConsensusState", _a0)} +// - ctx context.Context +func (_e *RPCClient_Expecter) DumpConsensusState(ctx interface{}) *RPCClient_DumpConsensusState_Call { + return &RPCClient_DumpConsensusState_Call{Call: _e.mock.On("DumpConsensusState", ctx)} } -func (_c *RPCClient_DumpConsensusState_Call) Run(run func(_a0 context.Context)) *RPCClient_DumpConsensusState_Call { +func (_c *RPCClient_DumpConsensusState_Call) Run(run func(ctx context.Context)) *RPCClient_DumpConsensusState_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) @@ -969,17 +1037,21 @@ func (_c *RPCClient_DumpConsensusState_Call) RunAndReturn(run func(context.Conte return _c } -// Genesis provides a mock function with given fields: _a0 -func (_m *RPCClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { - ret := _m.Called(_a0) +// Genesis provides a mock function with given fields: ctx +func (_m *RPCClient) Genesis(ctx context.Context) (*coretypes.ResultGenesis, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Genesis") + } var r0 *coretypes.ResultGenesis var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { - return rf(_a0) + return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultGenesis); ok { - r0 = rf(_a0) + r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultGenesis) @@ -987,7 +1059,7 @@ func (_m *RPCClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, err } if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + r1 = rf(ctx) } else { r1 = ret.Error(1) } @@ -1001,12 +1073,12 @@ type RPCClient_Genesis_Call struct { } // Genesis is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RPCClient_Expecter) Genesis(_a0 interface{}) *RPCClient_Genesis_Call { - return &RPCClient_Genesis_Call{Call: _e.mock.On("Genesis", _a0)} +// - ctx context.Context +func (_e *RPCClient_Expecter) Genesis(ctx interface{}) *RPCClient_Genesis_Call { + return &RPCClient_Genesis_Call{Call: _e.mock.On("Genesis", ctx)} } -func (_c *RPCClient_Genesis_Call) Run(run func(_a0 context.Context)) *RPCClient_Genesis_Call { +func (_c *RPCClient_Genesis_Call) Run(run func(ctx context.Context)) *RPCClient_Genesis_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) @@ -1023,17 +1095,21 @@ func (_c *RPCClient_Genesis_Call) RunAndReturn(run func(context.Context) (*coret return _c } -// GenesisChunked provides a mock function with given fields: _a0, _a1 -func (_m *RPCClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { - ret := _m.Called(_a0, _a1) +// GenesisChunked provides a mock function with given fields: ctx, id +func (_m *RPCClient) GenesisChunked(ctx context.Context, id uint) (*coretypes.ResultGenesisChunk, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for GenesisChunked") + } var r0 *coretypes.ResultGenesisChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { - return rf(_a0, _a1) + return rf(ctx, id) } if rf, ok := ret.Get(0).(func(context.Context, uint) *coretypes.ResultGenesisChunk); ok { - r0 = rf(_a0, _a1) + r0 = rf(ctx, id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultGenesisChunk) @@ -1041,7 +1117,7 @@ func (_m *RPCClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.R } if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok { - r1 = rf(_a0, _a1) + r1 = rf(ctx, id) } else { r1 = ret.Error(1) } @@ -1055,13 +1131,13 @@ type RPCClient_GenesisChunked_Call struct { } // GenesisChunked is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 uint -func (_e *RPCClient_Expecter) GenesisChunked(_a0 interface{}, _a1 interface{}) *RPCClient_GenesisChunked_Call { - return &RPCClient_GenesisChunked_Call{Call: _e.mock.On("GenesisChunked", _a0, _a1)} +// - ctx context.Context +// - id uint +func (_e *RPCClient_Expecter) GenesisChunked(ctx interface{}, id interface{}) *RPCClient_GenesisChunked_Call { + return &RPCClient_GenesisChunked_Call{Call: _e.mock.On("GenesisChunked", ctx, id)} } -func (_c *RPCClient_GenesisChunked_Call) Run(run func(_a0 context.Context, _a1 uint)) *RPCClient_GenesisChunked_Call { +func (_c *RPCClient_GenesisChunked_Call) Run(run func(ctx context.Context, id uint)) *RPCClient_GenesisChunked_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(uint)) }) @@ -1082,6 +1158,10 @@ func (_c *RPCClient_GenesisChunked_Call) RunAndReturn(run func(context.Context, func (_m *RPCClient) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { @@ -1137,6 +1217,10 @@ func (_c *RPCClient_Header_Call) RunAndReturn(run func(context.Context, *int64) func (_m *RPCClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for HeaderByHash") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { @@ -1188,17 +1272,21 @@ func (_c *RPCClient_HeaderByHash_Call) RunAndReturn(run func(context.Context, by return _c } -// Health provides a mock function with given fields: _a0 -func (_m *RPCClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { - ret := _m.Called(_a0) +// Health provides a mock function with given fields: ctx +func (_m *RPCClient) Health(ctx context.Context) (*coretypes.ResultHealth, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Health") + } var r0 *coretypes.ResultHealth var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { - return rf(_a0) + return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultHealth); ok { - r0 = rf(_a0) + r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultHealth) @@ -1206,7 +1294,7 @@ func (_m *RPCClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error } if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + r1 = rf(ctx) } else { r1 = ret.Error(1) } @@ -1220,12 +1308,12 @@ type RPCClient_Health_Call struct { } // Health is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RPCClient_Expecter) Health(_a0 interface{}) *RPCClient_Health_Call { - return &RPCClient_Health_Call{Call: _e.mock.On("Health", _a0)} +// - ctx context.Context +func (_e *RPCClient_Expecter) Health(ctx interface{}) *RPCClient_Health_Call { + return &RPCClient_Health_Call{Call: _e.mock.On("Health", ctx)} } -func (_c *RPCClient_Health_Call) Run(run func(_a0 context.Context)) *RPCClient_Health_Call { +func (_c *RPCClient_Health_Call) Run(run func(ctx context.Context)) *RPCClient_Health_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) @@ -1246,6 +1334,10 @@ func (_c *RPCClient_Health_Call) RunAndReturn(run func(context.Context) (*corety func (_m *RPCClient) IsRunning() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsRunning") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -1283,17 +1375,21 @@ func (_c *RPCClient_IsRunning_Call) RunAndReturn(run func() bool) *RPCClient_IsR return _c } -// NetInfo provides a mock function with given fields: _a0 -func (_m *RPCClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { - ret := _m.Called(_a0) +// NetInfo provides a mock function with given fields: ctx +func (_m *RPCClient) NetInfo(ctx context.Context) (*coretypes.ResultNetInfo, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for NetInfo") + } var r0 *coretypes.ResultNetInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { - return rf(_a0) + return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultNetInfo); ok { - r0 = rf(_a0) + r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultNetInfo) @@ -1301,7 +1397,7 @@ func (_m *RPCClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, err } if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + r1 = rf(ctx) } else { r1 = ret.Error(1) } @@ -1315,12 +1411,12 @@ type RPCClient_NetInfo_Call struct { } // NetInfo is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RPCClient_Expecter) NetInfo(_a0 interface{}) *RPCClient_NetInfo_Call { - return &RPCClient_NetInfo_Call{Call: _e.mock.On("NetInfo", _a0)} +// - ctx context.Context +func (_e *RPCClient_Expecter) NetInfo(ctx interface{}) *RPCClient_NetInfo_Call { + return &RPCClient_NetInfo_Call{Call: _e.mock.On("NetInfo", ctx)} } -func (_c *RPCClient_NetInfo_Call) Run(run func(_a0 context.Context)) *RPCClient_NetInfo_Call { +func (_c *RPCClient_NetInfo_Call) Run(run func(ctx context.Context)) *RPCClient_NetInfo_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) @@ -1337,17 +1433,21 @@ func (_c *RPCClient_NetInfo_Call) RunAndReturn(run func(context.Context) (*coret return _c } -// NumUnconfirmedTxs provides a mock function with given fields: _a0 -func (_m *RPCClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { - ret := _m.Called(_a0) +// NumUnconfirmedTxs provides a mock function with given fields: ctx +func (_m *RPCClient) NumUnconfirmedTxs(ctx context.Context) (*coretypes.ResultUnconfirmedTxs, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for NumUnconfirmedTxs") + } var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { - return rf(_a0) + return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultUnconfirmedTxs); ok { - r0 = rf(_a0) + r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) @@ -1355,7 +1455,7 @@ func (_m *RPCClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUn } if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + r1 = rf(ctx) } else { r1 = ret.Error(1) } @@ -1369,12 +1469,12 @@ type RPCClient_NumUnconfirmedTxs_Call struct { } // NumUnconfirmedTxs is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RPCClient_Expecter) NumUnconfirmedTxs(_a0 interface{}) *RPCClient_NumUnconfirmedTxs_Call { - return &RPCClient_NumUnconfirmedTxs_Call{Call: _e.mock.On("NumUnconfirmedTxs", _a0)} +// - ctx context.Context +func (_e *RPCClient_Expecter) NumUnconfirmedTxs(ctx interface{}) *RPCClient_NumUnconfirmedTxs_Call { + return &RPCClient_NumUnconfirmedTxs_Call{Call: _e.mock.On("NumUnconfirmedTxs", ctx)} } -func (_c *RPCClient_NumUnconfirmedTxs_Call) Run(run func(_a0 context.Context)) *RPCClient_NumUnconfirmedTxs_Call { +func (_c *RPCClient_NumUnconfirmedTxs_Call) Run(run func(ctx context.Context)) *RPCClient_NumUnconfirmedTxs_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) @@ -1395,6 +1495,10 @@ func (_c *RPCClient_NumUnconfirmedTxs_Call) RunAndReturn(run func(context.Contex func (_m *RPCClient) OnReset() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OnReset") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1436,6 +1540,10 @@ func (_c *RPCClient_OnReset_Call) RunAndReturn(run func() error) *RPCClient_OnRe func (_m *RPCClient) OnStart() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OnStart") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1509,6 +1617,10 @@ func (_c *RPCClient_OnStop_Call) RunAndReturn(run func()) *RPCClient_OnStop_Call func (_m *RPCClient) Quit() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Quit") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -1552,6 +1664,10 @@ func (_c *RPCClient_Quit_Call) RunAndReturn(run func() <-chan struct{}) *RPCClie func (_m *RPCClient) Reset() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Reset") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1589,9 +1705,9 @@ func (_c *RPCClient_Reset_Call) RunAndReturn(run func() error) *RPCClient_Reset_ return _c } -// SetLogger provides a mock function with given fields: _a0 -func (_m *RPCClient) SetLogger(_a0 log.Logger) { - _m.Called(_a0) +// SetLogger provides a mock function with given fields: l +func (_m *RPCClient) SetLogger(l log.Logger) { + _m.Called(l) } // RPCClient_SetLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLogger' @@ -1600,12 +1716,12 @@ type RPCClient_SetLogger_Call struct { } // SetLogger is a helper method to define mock.On call -// - _a0 log.Logger -func (_e *RPCClient_Expecter) SetLogger(_a0 interface{}) *RPCClient_SetLogger_Call { - return &RPCClient_SetLogger_Call{Call: _e.mock.On("SetLogger", _a0)} +// - l log.Logger +func (_e *RPCClient_Expecter) SetLogger(l interface{}) *RPCClient_SetLogger_Call { + return &RPCClient_SetLogger_Call{Call: _e.mock.On("SetLogger", l)} } -func (_c *RPCClient_SetLogger_Call) Run(run func(_a0 log.Logger)) *RPCClient_SetLogger_Call { +func (_c *RPCClient_SetLogger_Call) Run(run func(l log.Logger)) *RPCClient_SetLogger_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(log.Logger)) }) @@ -1626,6 +1742,10 @@ func (_c *RPCClient_SetLogger_Call) RunAndReturn(run func(log.Logger)) *RPCClien func (_m *RPCClient) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1663,17 +1783,21 @@ func (_c *RPCClient_Start_Call) RunAndReturn(run func() error) *RPCClient_Start_ return _c } -// Status provides a mock function with given fields: _a0 -func (_m *RPCClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { - ret := _m.Called(_a0) +// Status provides a mock function with given fields: ctx +func (_m *RPCClient) Status(ctx context.Context) (*coretypes.ResultStatus, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Status") + } var r0 *coretypes.ResultStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { - return rf(_a0) + return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultStatus); ok { - r0 = rf(_a0) + r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.ResultStatus) @@ -1681,7 +1805,7 @@ func (_m *RPCClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error } if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) + r1 = rf(ctx) } else { r1 = ret.Error(1) } @@ -1695,12 +1819,12 @@ type RPCClient_Status_Call struct { } // Status is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RPCClient_Expecter) Status(_a0 interface{}) *RPCClient_Status_Call { - return &RPCClient_Status_Call{Call: _e.mock.On("Status", _a0)} +// - ctx context.Context +func (_e *RPCClient_Expecter) Status(ctx interface{}) *RPCClient_Status_Call { + return &RPCClient_Status_Call{Call: _e.mock.On("Status", ctx)} } -func (_c *RPCClient_Status_Call) Run(run func(_a0 context.Context)) *RPCClient_Status_Call { +func (_c *RPCClient_Status_Call) Run(run func(ctx context.Context)) *RPCClient_Status_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) @@ -1721,6 +1845,10 @@ func (_c *RPCClient_Status_Call) RunAndReturn(run func(context.Context) (*corety func (_m *RPCClient) Stop() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Stop") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1762,6 +1890,10 @@ func (_c *RPCClient_Stop_Call) RunAndReturn(run func() error) *RPCClient_Stop_Ca func (_m *RPCClient) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -1810,6 +1942,10 @@ func (_m *RPCClient) Subscribe(ctx context.Context, subscriber string, query str _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 <-chan coretypes.ResultEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { @@ -1874,6 +2010,10 @@ func (_c *RPCClient_Subscribe_Call) RunAndReturn(run func(context.Context, strin func (_m *RPCClient) Tx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) + if len(ret) == 0 { + panic("no return value specified for Tx") + } + var r0 *coretypes.ResultTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, []byte, bool) (*coretypes.ResultTx, error)); ok { @@ -1930,6 +2070,10 @@ func (_c *RPCClient_Tx_Call) RunAndReturn(run func(context.Context, []byte, bool func (_m *RPCClient) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for TxSearch") + } + var r0 *coretypes.ResultTxSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { @@ -1989,6 +2133,10 @@ func (_c *RPCClient_TxSearch_Call) RunAndReturn(run func(context.Context, string func (_m *RPCClient) UnconfirmedTxs(ctx context.Context, limit *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, limit) + if len(ret) == 0 { + panic("no return value specified for UnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -2044,6 +2192,10 @@ func (_c *RPCClient_UnconfirmedTxs_Call) RunAndReturn(run func(context.Context, func (_m *RPCClient) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, subscriber, query) @@ -2088,6 +2240,10 @@ func (_c *RPCClient_Unsubscribe_Call) RunAndReturn(run func(context.Context, str func (_m *RPCClient) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) + if len(ret) == 0 { + panic("no return value specified for UnsubscribeAll") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, subscriber) @@ -2131,6 +2287,10 @@ func (_c *RPCClient_UnsubscribeAll_Call) RunAndReturn(run func(context.Context, func (_m *RPCClient) Validators(ctx context.Context, height *int64, page *int, perPage *int) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage) + if len(ret) == 0 { + panic("no return value specified for Validators") + } + var r0 *coretypes.ResultValidators var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int) (*coretypes.ResultValidators, error)); ok { diff --git a/ignite/pkg/cosmosclient/mocks/signer.go b/ignite/pkg/cosmosclient/mocks/signer.go index 65abb06f7f..f09dd523ea 100644 --- a/ignite/pkg/cosmosclient/mocks/signer.go +++ b/ignite/pkg/cosmosclient/mocks/signer.go @@ -1,10 +1,8 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks import ( - context "context" - client "github.com/cosmos/cosmos-sdk/client" mock "github.com/stretchr/testify/mock" @@ -26,11 +24,15 @@ func (_m *Signer) EXPECT() *Signer_Expecter { } // Sign provides a mock function with given fields: ctx, txf, name, txBuilder, overwriteSig -func (_m *Signer) Sign(ctx context.Context, txf tx.Factory, name string, txBuilder client.TxBuilder, overwriteSig bool) error { +func (_m *Signer) Sign(ctx client.Context, txf tx.Factory, name string, txBuilder client.TxBuilder, overwriteSig bool) error { ret := _m.Called(ctx, txf, name, txBuilder, overwriteSig) + if len(ret) == 0 { + panic("no return value specified for Sign") + } + var r0 error - if rf, ok := ret.Get(0).(func(context.Context, tx.Factory, string, client.TxBuilder, bool) error); ok { + if rf, ok := ret.Get(0).(func(client.Context, tx.Factory, string, client.TxBuilder, bool) error); ok { r0 = rf(ctx, txf, name, txBuilder, overwriteSig) } else { r0 = ret.Error(0) @@ -45,7 +47,7 @@ type Signer_Sign_Call struct { } // Sign is a helper method to define mock.On call -// - ctx context.Context +// - ctx client.Context // - txf tx.Factory // - name string // - txBuilder client.TxBuilder @@ -54,9 +56,9 @@ func (_e *Signer_Expecter) Sign(ctx interface{}, txf interface{}, name interface return &Signer_Sign_Call{Call: _e.mock.On("Sign", ctx, txf, name, txBuilder, overwriteSig)} } -func (_c *Signer_Sign_Call) Run(run func(ctx context.Context, txf tx.Factory, name string, txBuilder client.TxBuilder, overwriteSig bool)) *Signer_Sign_Call { +func (_c *Signer_Sign_Call) Run(run func(ctx client.Context, txf tx.Factory, name string, txBuilder client.TxBuilder, overwriteSig bool)) *Signer_Sign_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(tx.Factory), args[2].(string), args[3].(client.TxBuilder), args[4].(bool)) + run(args[0].(client.Context), args[1].(tx.Factory), args[2].(string), args[3].(client.TxBuilder), args[4].(bool)) }) return _c } @@ -66,7 +68,7 @@ func (_c *Signer_Sign_Call) Return(_a0 error) *Signer_Sign_Call { return _c } -func (_c *Signer_Sign_Call) RunAndReturn(run func(context.Context, tx.Factory, string, client.TxBuilder, bool) error) *Signer_Sign_Call { +func (_c *Signer_Sign_Call) RunAndReturn(run func(client.Context, tx.Factory, string, client.TxBuilder, bool) error) *Signer_Sign_Call { _c.Call.Return(run) return _c } diff --git a/ignite/pkg/cosmosclient/signer.go b/ignite/pkg/cosmosclient/signer.go index ecc65dd6e4..8cd0901c36 100644 --- a/ignite/pkg/cosmosclient/signer.go +++ b/ignite/pkg/cosmosclient/signer.go @@ -1,8 +1,6 @@ package cosmosclient import ( - "context" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" ) @@ -12,6 +10,6 @@ var _ Signer = signer{} // signer implements the Signer interface. type signer struct{} -func (signer) Sign(ctx context.Context, txf tx.Factory, name string, txBuilder client.TxBuilder, overwriteSig bool) error { +func (signer) Sign(ctx client.Context, txf tx.Factory, name string, txBuilder client.TxBuilder, overwriteSig bool) error { return tx.Sign(ctx, txf, name, txBuilder, overwriteSig) } diff --git a/ignite/pkg/cosmosclient/testutil/mocks.go b/ignite/pkg/cosmosclient/testutil/mocks.go index da8b6bbd9a..618ca866c2 100644 --- a/ignite/pkg/cosmosclient/testutil/mocks.go +++ b/ignite/pkg/cosmosclient/testutil/mocks.go @@ -10,7 +10,7 @@ import ( //go:generate mockery --srcpkg github.com/cometbft/cometbft/rpc/client --name Client --structname RPCClient --filename rpc_client.go --output ../mocks --with-expecter //go:generate mockery --srcpkg github.com/cosmos/cosmos-sdk/client --name AccountRetriever --filename account_retriever.go --output ../mocks --with-expecter -//go:generate mockery --srcpkg github.com/cosmos/cosmos-sdk/x/bank/types --name QueryClient --structname BankQueryClient --filename bank_query_client.go --output ../mocks --with-expecter +//go:generate mockery --srcpkg cosmossdk.io/x/bank/types --name QueryClient --structname BankQueryClient --filename bank_query_client.go --output ../mocks --with-expecter // NewTendermintClientMock creates a new Tendermint RPC client mock. func NewTendermintClientMock(t *testing.T) *TendermintClientMock { diff --git a/ignite/pkg/cosmosclient/txservice.go b/ignite/pkg/cosmosclient/txservice.go index 19f2b4c65f..babfc69bd8 100644 --- a/ignite/pkg/cosmosclient/txservice.go +++ b/ignite/pkg/cosmosclient/txservice.go @@ -42,8 +42,8 @@ func (s TxService) Broadcast(ctx context.Context) (Response, error) { } } - accountName := s.clientContext.GetFromName() - if err := s.client.signer.Sign(ctx, s.txFactory, accountName, s.txBuilder, true); err != nil { + accountName := s.clientContext.FromName + if err := s.client.signer.Sign(s.clientContext, s.txFactory, accountName, s.txBuilder, true); err != nil { return Response{}, errors.WithStack(err) } diff --git a/ignite/pkg/cosmosclient/txservice_test.go b/ignite/pkg/cosmosclient/txservice_test.go index a9d5c92386..d0d2322b0c 100644 --- a/ignite/pkg/cosmosclient/txservice_test.go +++ b/ignite/pkg/cosmosclient/txservice_test.go @@ -1,16 +1,16 @@ package cosmosclient_test import ( - "context" "encoding/hex" "testing" + "cosmossdk.io/core/transaction" "cosmossdk.io/math" + banktypes "cosmossdk.io/x/bank/types" abci "github.com/cometbft/cometbft/abci/types" ctypes "github.com/cometbft/cometbft/rpc/core/types" sdktypes "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -21,7 +21,6 @@ import ( func TestTxServiceBroadcast(t *testing.T) { var ( - goCtx = context.Background() accountName = "bob" passphrase = "passphrase" txHash = []byte{1, 2, 3} @@ -45,7 +44,7 @@ func TestTxServiceBroadcast(t *testing.T) { } tests := []struct { name string - msg sdktypes.Msg + msg transaction.Msg opts []cosmosclient.Option expectedResponse *sdktypes.TxResponse expectedError string @@ -59,7 +58,7 @@ func TestTxServiceBroadcast(t *testing.T) { setup: func(s suite) { s.expectPrepareFactory(sdkaddr) s.signer.EXPECT(). - Sign(goCtx, mock.Anything, "bob", mock.Anything, true). + Sign(mock.Anything, mock.Anything, "bob", mock.Anything, true). Return(nil) s.rpcClient.EXPECT(). BroadcastTxSync(mock.Anything, mock.Anything). @@ -74,7 +73,7 @@ func TestTxServiceBroadcast(t *testing.T) { setup: func(s suite) { s.expectPrepareFactory(sdkaddr) s.signer.EXPECT(). - Sign(goCtx, mock.Anything, "bob", mock.Anything, true). + Sign(mock.Anything, mock.Anything, "bob", mock.Anything, true). Return(nil) s.rpcClient.EXPECT(). BroadcastTxSync(mock.Anything, mock.Anything). @@ -95,7 +94,7 @@ func TestTxServiceBroadcast(t *testing.T) { setup: func(s suite) { s.expectPrepareFactory(sdkaddr) s.signer.EXPECT(). - Sign(goCtx, mock.Anything, "bob", mock.Anything, true). + Sign(mock.Anything, mock.Anything, "bob", mock.Anything, true). Return(nil) s.rpcClient.EXPECT(). BroadcastTxSync(mock.Anything, mock.Anything). @@ -104,7 +103,7 @@ func TestTxServiceBroadcast(t *testing.T) { }, nil) // Tx is broadcasted, now check for confirmation - s.rpcClient.EXPECT().Tx(goCtx, txHash, false). + s.rpcClient.EXPECT().Tx(mock.Anything, txHash, false). Return(&ctypes.ResultTx{ Hash: txHash, TxResult: abci.ExecTxResult{ @@ -121,7 +120,7 @@ func TestTxServiceBroadcast(t *testing.T) { setup: func(s suite) { s.expectPrepareFactory(sdkaddr) s.signer.EXPECT(). - Sign(goCtx, mock.Anything, "bob", mock.Anything, true). + Sign(mock.Anything, mock.Anything, "bob", mock.Anything, true). Return(nil) s.rpcClient.EXPECT(). BroadcastTxSync(mock.Anything, mock.Anything). @@ -130,7 +129,7 @@ func TestTxServiceBroadcast(t *testing.T) { }, nil) // Tx is broadcasted, now check for confirmation - s.rpcClient.EXPECT().Tx(goCtx, txHash, false). + s.rpcClient.EXPECT().Tx(mock.Anything, txHash, false). Return(&ctypes.ResultTx{ Hash: txHash, TxResult: abci.ExecTxResult{ @@ -150,7 +149,7 @@ func TestTxServiceBroadcast(t *testing.T) { setup: func(s suite) { s.expectPrepareFactory(sdkaddr) s.signer.EXPECT(). - Sign(goCtx, mock.Anything, "bob", mock.Anything, true). + Sign(mock.Anything, mock.Anything, "bob", mock.Anything, true). Return(nil) s.rpcClient.EXPECT(). BroadcastTxSync(mock.Anything, mock.Anything). @@ -160,19 +159,19 @@ func TestTxServiceBroadcast(t *testing.T) { // Tx is broadcasted, now check for confirmation // First time the tx is not found (not confirmed yet) - s.rpcClient.EXPECT().Tx(goCtx, txHash, false). + s.rpcClient.EXPECT().Tx(mock.Anything, txHash, false). Return(nil, errors.New("not found")).Once() // Wait for 1 block - s.rpcClient.EXPECT().Status(goCtx). + s.rpcClient.EXPECT().Status(mock.Anything). Return(&ctypes.ResultStatus{ SyncInfo: ctypes.SyncInfo{LatestBlockHeight: 1}, }, nil).Once() - s.rpcClient.EXPECT().Status(goCtx). + s.rpcClient.EXPECT().Status(mock.Anything). Return(&ctypes.ResultStatus{ SyncInfo: ctypes.SyncInfo{LatestBlockHeight: 2}, }, nil).Once() // Then try gain to fetch the tx, this time it is confirmed - s.rpcClient.EXPECT().Tx(goCtx, txHash, false). + s.rpcClient.EXPECT().Tx(mock.Anything, txHash, false). Return(&ctypes.ResultTx{ Hash: txHash, }, nil) @@ -187,11 +186,10 @@ func TestTxServiceBroadcast(t *testing.T) { ctx := c.Context(). WithFromName(accountName). WithFromAddress(sdkaddr) - txService, err := c.CreateTx(goCtx, account, tt.msg) + txService, err := c.CreateTx(ctx.CmdContext, account, tt.msg) require.NoError(t, err) - res, err := txService.Broadcast(goCtx) - + res, err := txService.Broadcast(ctx.CmdContext) if tt.expectedError != "" { require.EqualError(t, err, tt.expectedError) return diff --git a/ignite/pkg/cosmosgen/generate_openapi.go b/ignite/pkg/cosmosgen/generate_openapi.go index 659216e520..ca89ca7faf 100644 --- a/ignite/pkg/cosmosgen/generate_openapi.go +++ b/ignite/pkg/cosmosgen/generate_openapi.go @@ -87,6 +87,7 @@ func (g *generator) generateOpenAPISpec(ctx context.Context) error { "*/cosmos/app/v1alpha1/*", "*/cosmos/tx/config/v1/config.proto", "*/cosmos/msg/textual/v1/textual.proto", + "*/cosmos/vesting/v1beta1/vesting.proto", ), cosmosbuf.FileByFile(), ); err != nil { diff --git a/ignite/pkg/cosmosgen/template.go b/ignite/pkg/cosmosgen/template.go index a8811c5f2d..ceec8cebdf 100644 --- a/ignite/pkg/cosmosgen/template.go +++ b/ignite/pkg/cosmosgen/template.go @@ -66,7 +66,7 @@ func (t templateWriter) Write(destDir, protoPath string, data interface{}) error return strcase.ToCamel(replacer.Replace(word)) }, - "resolveFile": func(fullPath string) string { + "resolveFile": func(fullPath string) string { // TODO to check rel, _ := filepath.Rel(protoPath, fullPath) rel = strings.TrimSuffix(rel, ".proto") return rel diff --git a/ignite/pkg/cosmostxcollector/mocks/saver.go b/ignite/pkg/cosmostxcollector/mocks/saver.go index 1b77722767..e39b0004fd 100644 --- a/ignite/pkg/cosmostxcollector/mocks/saver.go +++ b/ignite/pkg/cosmostxcollector/mocks/saver.go @@ -1,13 +1,12 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks import ( context "context" - mock "github.com/stretchr/testify/mock" - cosmosclient "github.com/ignite/cli/v29/ignite/pkg/cosmosclient" + mock "github.com/stretchr/testify/mock" ) // Saver is an autogenerated mock type for the Saver type @@ -27,6 +26,10 @@ func (_m *Saver) EXPECT() *Saver_Expecter { func (_m *Saver) Save(_a0 context.Context, _a1 []cosmosclient.TX) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Save") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []cosmosclient.TX) error); ok { r0 = rf(_a0, _a1) diff --git a/ignite/pkg/cosmostxcollector/mocks/txs_collector.go b/ignite/pkg/cosmostxcollector/mocks/txs_collector.go index 79b186cfa2..d2f66c0cc0 100644 --- a/ignite/pkg/cosmostxcollector/mocks/txs_collector.go +++ b/ignite/pkg/cosmostxcollector/mocks/txs_collector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *TXsCollector) EXPECT() *TXsCollector_Expecter { func (_m *TXsCollector) CollectTXs(ctx context.Context, fromHeight int64, tc chan<- []cosmosclient.TX) error { ret := _m.Called(ctx, fromHeight, tc) + if len(ret) == 0 { + panic("no return value specified for CollectTXs") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, int64, chan<- []cosmosclient.TX) error); ok { r0 = rf(ctx, fromHeight, tc) diff --git a/ignite/services/chain/lint_test.go b/ignite/services/chain/lint_test.go deleted file mode 100644 index 7821f73d66..0000000000 --- a/ignite/services/chain/lint_test.go +++ /dev/null @@ -1,6 +0,0 @@ -package chain_test - -import "testing" - -func TestChainLint(_ *testing.T) { -} diff --git a/ignite/services/chain/simulate.go b/ignite/services/chain/simulate.go index 7c68048bb1..36863872e6 100644 --- a/ignite/services/chain/simulate.go +++ b/ignite/services/chain/simulate.go @@ -8,7 +8,6 @@ import ( type simappOptions struct { enabled bool - verbose bool config simulation.Config period uint genesisTime int64 @@ -20,7 +19,6 @@ func newSimappOptions() simappOptions { Commit: true, }, enabled: true, - verbose: false, period: 0, genesisTime: 0, } @@ -29,13 +27,6 @@ func newSimappOptions() simappOptions { // SimappOption provides options for the simapp command. type SimappOption func(*simappOptions) -// SimappWithVerbose enable the verbose mode. -func SimappWithVerbose(verbose bool) SimappOption { - return func(c *simappOptions) { - c.verbose = verbose - } -} - // SimappWithPeriod allows running slow invariants only once every period assertions. func SimappWithPeriod(period uint) SimappOption { return func(c *simappOptions) { @@ -72,7 +63,6 @@ func (c *Chain) Simulate(ctx context.Context, options ...SimappOption) error { return commands.Simulation(ctx, c.app.Path, simappOptions.enabled, - simappOptions.verbose, simappOptions.config, simappOptions.period, simappOptions.genesisTime, diff --git a/ignite/services/plugin/mocks/chainer.go b/ignite/services/plugin/mocks/chainer.go index ed1e81a907..0327652519 100644 --- a/ignite/services/plugin/mocks/chainer.go +++ b/ignite/services/plugin/mocks/chainer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks @@ -21,6 +21,10 @@ func (_m *ChainerInterface) EXPECT() *ChainerInterface_Expecter { func (_m *ChainerInterface) AppPath() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppPath") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -62,6 +66,10 @@ func (_c *ChainerInterface_AppPath_Call) RunAndReturn(run func() string) *Chaine func (_m *ChainerInterface) ConfigPath() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ConfigPath") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -103,6 +111,10 @@ func (_c *ChainerInterface_ConfigPath_Call) RunAndReturn(run func() string) *Cha func (_m *ChainerInterface) Home() (string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Home") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func() (string, error)); ok { @@ -154,6 +166,10 @@ func (_c *ChainerInterface_Home_Call) RunAndReturn(run func() (string, error)) * func (_m *ChainerInterface) ID() (string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func() (string, error)); ok { @@ -205,6 +221,10 @@ func (_c *ChainerInterface_ID_Call) RunAndReturn(run func() (string, error)) *Ch func (_m *ChainerInterface) RPCPublicAddress() (string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RPCPublicAddress") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func() (string, error)); ok { diff --git a/ignite/services/plugin/plugin_test.go b/ignite/services/plugin/plugin_test.go index 25acc45649..bda1e9013d 100644 --- a/ignite/services/plugin/plugin_test.go +++ b/ignite/services/plugin/plugin_test.go @@ -227,6 +227,8 @@ func (TestClientAPI) GetChainInfo(context.Context) (*ChainInfo, error) { } func TestPluginLoad(t *testing.T) { + t.Skip() // Re-enable when 0.52 integration finished + wd, err := os.Getwd() require.NoError(t, err) @@ -415,6 +417,8 @@ func TestPluginLoad(t *testing.T) { } func TestPluginLoadSharedHost(t *testing.T) { + t.Skip() // Re-enable when 0.52 integration finished + tests := []struct { name string instances int diff --git a/ignite/services/scaffolder/module.go b/ignite/services/scaffolder/module.go index 55b756d03f..6d882f5af9 100644 --- a/ignite/services/scaffolder/module.go +++ b/ignite/services/scaffolder/module.go @@ -62,6 +62,8 @@ var ( "nft": {}, "group": {}, "consensus": {}, + "epochs": {}, + "protocolpool": {}, } // defaultStoreKeys are the names of the default store keys defined in a Cosmos-SDK app. diff --git a/ignite/templates/app/files-minimal/app/app.go.plush b/ignite/templates/app/files-minimal/app/app.go.plush index 34af557321..c734097e0f 100644 --- a/ignite/templates/app/files-minimal/app/app.go.plush +++ b/ignite/templates/app/files-minimal/app/app.go.plush @@ -4,18 +4,21 @@ import ( "io" clienthelpers "cosmossdk.io/client/v2/helpers" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/registry" + corestore "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - _ "cosmossdk.io/api/cosmos/tx/config/v1" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/auth" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects - dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/x/accounts" + basedepinject "cosmossdk.io/x/accounts/defaults/base/depinject" + lockupdepinject "cosmossdk.io/x/accounts/defaults/lockup/depinject" + multisigdepinject "cosmossdk.io/x/accounts/defaults/multisig/depinject" + basedepinject "cosmossdk.io/x/accounts/defaults/base/depinject" + bankkeeper "cosmossdk.io/x/bank/keeper" + distrkeeper "cosmossdk.io/x/distribution/keeper" + _ "cosmossdk.io/x/protocolpool" + stakingkeeper "cosmossdk.io/x/staking/keeper" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -27,13 +30,6 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/types/module" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "<%= ModulePath %>/docs" ) @@ -43,10 +39,8 @@ const ( Name = "<%= BinaryNamePrefix %>" ) -var ( - // DefaultNodeHome default home directories for the application daemon - DefaultNodeHome string -) +// DefaultNodeHome default home directories for the application daemon +var DefaultNodeHome string var ( _ runtime.AppI = (*App)(nil) @@ -58,17 +52,17 @@ var ( // capabilities aren't needed for testing. type App struct { *runtime.App - legacyAmino *codec.LegacyAmino + legacyAmino registry.AminoRegistrar appCodec codec.Codec txConfig client.TxConfig interfaceRegistry codectypes.InterfaceRegistry // keepers - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - StakingKeeper *stakingkeeper.Keeper - DistrKeeper distrkeeper.Keeper - ConsensusParamsKeeper consensuskeeper.Keeper + AccountsKeeper accounts.Keeper + AuthKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + StakingKeeper *stakingkeeper.Keeper + DistrKeeper distrkeeper.Keeper // this line is used by starport scaffolding # stargate/app/keeperDeclaration @@ -79,7 +73,7 @@ type App struct { func init() { var err error clienthelpers.EnvPrefix = Name - DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory("."+Name) + DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory("." + Name) if err != nil { panic(err) } @@ -89,27 +83,18 @@ func init() { func AppConfig() depinject.Config { return depinject.Configs( appConfig, - // Alternatively, load the app config from a YAML file. - // appconfig.LoadYAML(AppConfigYAML), - depinject.Supply( - // supply custom module basics - map[string]module.AppModuleBasic{ - genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), - // this line is used by starport scaffolding # stargate/appConfig/moduleBasic - }, - ), ) } // New returns a reference to an initialized App. func New( logger log.Logger, - db dbm.DB, + db corestore.KVStoreWithBatch, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), -) (*App, error) { +) *App { var ( app = &App{} appBuilder *runtime.AppBuilder @@ -118,9 +103,12 @@ func New( appConfig = depinject.Configs( AppConfig(), depinject.Supply( - appOpts, // supply app options - logger, // supply logger - + appOpts, // supply app options + logger, // supply logger + basedepinject.ProvideAccount, // supply baseapp account + basedepinject.ProvideSecp256K1PubKey, // supply default base account public key format + multisigdepinject.ProvideAccount, // multisig account type + lockupdepinject.ProvideAllLockupAccounts, // lockup account type // here alternative options can be supplied to the DI container. // those options can be used f.e to override the default behavior of some modules. // for instance supplying a custom address codec for not using bech32 addresses. @@ -130,33 +118,31 @@ func New( ) ) + var appModules map[string]appmodule.AppModule if err := depinject.Inject(appConfig, &appBuilder, + &appModules, &app.appCodec, &app.legacyAmino, &app.txConfig, &app.interfaceRegistry, - &app.AccountKeeper, + &app.AuthKeeper, + &app.AccountsKeeper, &app.BankKeeper, &app.StakingKeeper, &app.DistrKeeper, - &app.ConsensusParamsKeeper, - ); err != nil { panic(err) } // add to default baseapp options - // uncomment to enable Optimistic Execution - // baseAppOptions = append(baseAppOptions, baseapp.SetOptimisticExecution()) + // enable optimistic execution + baseAppOptions = append(baseAppOptions, baseapp.SetOptimisticExecution()) // build app app.App = appBuilder.Build(db, traceStore, baseAppOptions...) - // register streaming services - if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { - return nil, err - } + /**** Module Options ****/ // create the simulation manager and define the order of the modules for deterministic simulations app.sm = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, make(map[string]module.AppModuleSimulation)) @@ -168,16 +154,16 @@ func New( // However, when registering a module manually (i.e. that does not support app wiring), the module version map // must be set manually as follow. The upgrade module will de-duplicate the module version map. // - // app.SetInitChainer(func(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { + // app.SetInitChainer(func(ctx sdk.Context, req *abci.InitChainRequest) (*abci.InitChainResponse, error) { // app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()) // return app.App.InitChainer(ctx, req) // }) if err := app.Load(loadLatest); err != nil { - return nil, err + panic(err) } - return app, nil + return app } // LegacyAmino returns App's amino codec. @@ -185,7 +171,12 @@ func New( // 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 *App) LegacyAmino() *codec.LegacyAmino { - return app.legacyAmino + switch cdc := app.legacyAmino.(type) { + case *codec.LegacyAmino: + return cdc + default: + panic("unexpected codec type") + } } // AppCodec returns App's app codec. @@ -196,48 +187,17 @@ func (app *App) AppCodec() codec.Codec { return app.appCodec } -// InterfaceRegistry returns App's interfaceRegistry. +// InterfaceRegistry returns App's InterfaceRegistry. func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry { return app.interfaceRegistry } -// TxConfig returns App's tx config. +// TxConfig returns App's TxConfig func (app *App) TxConfig() client.TxConfig { return app.txConfig } -// GetKey returns the KVStoreKey for the provided store key. -func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey { - kvStoreKey, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.KVStoreKey) - if !ok { - return nil - } - return kvStoreKey -} - -// GetMemKey returns the MemoryStoreKey for the provided store key. -func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { - key, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.MemoryStoreKey) - if !ok { - return nil - } - - return key -} - -// kvStoreKeys returns all the kv store keys registered inside App. -func (app *App) kvStoreKeys() map[string]*storetypes.KVStoreKey { - keys := make(map[string]*storetypes.KVStoreKey) - for _, k := range app.GetStoreKeys() { - if kv, ok := k.(*storetypes.KVStoreKey); ok { - keys[kv.Name()] = kv - } - } - - return keys -} - -// SimulationManager implements the SimulationApp interface. +// SimulationManager implements the SimulationApp interface func (app *App) SimulationManager() *module.SimulationManager { return app.sm } @@ -263,12 +223,14 @@ func GetMaccPerms() map[string][]string { for _, perms := range moduleAccPerms { dup[perms.Account] = perms.Permissions } + return dup } // BlockedAddresses returns all the app's blocked account addresses. func BlockedAddresses() map[string]bool { result := make(map[string]bool) + if len(blockAccAddrs) > 0 { for _, addr := range blockAccAddrs { result[addr] = true @@ -278,5 +240,6 @@ func BlockedAddresses() map[string]bool { result[addr] = true } } + return result -} +} \ No newline at end of file diff --git a/ignite/templates/app/files-minimal/app/app_config.go.plush b/ignite/templates/app/files-minimal/app/app_config.go.plush index 56691873b5..13d7a7c951 100644 --- a/ignite/templates/app/files-minimal/app/app_config.go.plush +++ b/ignite/templates/app/files-minimal/app/app_config.go.plush @@ -1,6 +1,7 @@ package app import ( + accountsmodulev1 "cosmossdk.io/api/cosmos/accounts/module/v1" runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" @@ -8,66 +9,38 @@ import ( consensusmodulev1 "cosmossdk.io/api/cosmos/consensus/module/v1" distrmodulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" + poolmodulev1 "cosmossdk.io/api/cosmos/protocolpool/module/v1" stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" "cosmossdk.io/depinject/appconfig" - upgradetypes "cosmossdk.io/x/upgrade/types" + "cosmossdk.io/x/accounts" + _ "cosmossdk.io/x/bank" // import for side-effects + banktypes "cosmossdk.io/x/bank/types" + _ "cosmossdk.io/x/consensus" // import for side-effects + consensustypes "cosmossdk.io/x/consensus/types" + _ "cosmossdk.io/x/distribution" // import for side-effects + distrtypes "cosmossdk.io/x/distribution/types" + minttypes "cosmossdk.io/x/mint/types" + _ "cosmossdk.io/x/protocolpool" // import for side-effects + pooltypes "cosmossdk.io/x/protocolpool/types" + _ "cosmossdk.io/x/staking" // import for side-effects + stakingtypes "cosmossdk.io/x/staking/types" + "github.com/cosmos/cosmos-sdk/runtime" + _ "github.com/cosmos/cosmos-sdk/testutil/x/counter" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/auth" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) var ( - // NOTE: The genutils module must occur after staking so that pools are - // properly initialized with tokens from genesis accounts. - // NOTE: The genutils module must also occur after auth so that it can access the params from auth. - // NOTE: Capability module must occur first so that it can initialize any capabilities - // so that other modules that want to create or claim capabilities afterwards in InitChain - // can do so safely. - genesisModuleOrder = []string{ - // cosmos-sdk modules - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - stakingtypes.ModuleName, - genutiltypes.ModuleName, - // chain modules - // this line is used by starport scaffolding # stargate/app/initGenesis - } - - // During begin block slashing happens after distr.BeginBlocker so that - // there is nothing left over in the validator fee pool, so as to keep the - // CanWithdrawInvariant invariant. - // NOTE: staking module is required if HistoricalEntries param > 0 - beginBlockers = []string{ - // cosmos sdk modules - distrtypes.ModuleName, - stakingtypes.ModuleName, - // chain modules - // this line is used by starport scaffolding # stargate/app/beginBlockers - } - - endBlockers = []string{ - // cosmos sdk modules - stakingtypes.ModuleName, - // chain modules - // this line is used by starport scaffolding # stargate/app/endBlockers - } - - preBlockers = []string{ - upgradetypes.ModuleName, - // this line is used by starport scaffolding # stargate/app/preBlockers - } - - // module account permissions moduleAccPerms = []*authmodulev1.ModuleAccountPermission{ {Account: authtypes.FeeCollectorName}, {Account: distrtypes.ModuleName}, + {Account: pooltypes.ModuleName}, + {Account: pooltypes.StreamAccount}, + {Account: pooltypes.ProtocolPoolDistrAccount}, {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, @@ -80,30 +53,70 @@ var ( distrtypes.ModuleName, stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, + // We allow the following module accounts to receive funds: + // govtypes.ModuleName + // pooltypes.ModuleName } - // appConfig application configuration (used by depinject) + // application configuration (used by depinject) appConfig = appconfig.Compose(&appv1alpha1.Config{ Modules: []*appv1alpha1.ModuleConfig{ { Name: runtime.ModuleName, Config: appconfig.WrapAny(&runtimev1alpha1.Module{ - AppName: Name, - PreBlockers: preBlockers, - BeginBlockers: beginBlockers, - EndBlockers: endBlockers, - InitGenesis: genesisModuleOrder, + AppName: Name, + // NOTE: upgrade module is required to be prioritized + PreBlockers: []string{ + // this line is used by starport scaffolding # stargate/app/preBlockers + }, + // During begin block slashing happens after distr.BeginBlocker so that + // there is nothing left over in the validator fee pool, so as to keep the + // CanWithdrawInvariant invariant. + // NOTE: staking module is required if HistoricalEntries param > 0 + BeginBlockers: []string{ + distrtypes.ModuleName, + pooltypes.ModuleName, + stakingtypes.ModuleName, + // chain modules + // this line is used by starport scaffolding # stargate/app/beginBlockers + }, + EndBlockers: []string{ + stakingtypes.ModuleName, + pooltypes.ModuleName, + // chain modules + // this line is used by starport scaffolding # stargate/app/endBlockers + }, + // The following is mostly only needed when ModuleName != StoreKey name. OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ { ModuleName: authtypes.ModuleName, KvStoreKey: "acc", }, + { + ModuleName: accounts.ModuleName, + KvStoreKey: accounts.StoreKey, + }, + }, + // NOTE: The genutils module must occur after staking so that pools are + // properly initialized with tokens from genesis accounts. + // NOTE: The genutils module must also occur after auth so that it can access the params from auth. + InitGenesis: []string{ + consensustypes.ModuleName, + accounts.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + distrtypes.ModuleName, + stakingtypes.ModuleName, + genutiltypes.ModuleName, + pooltypes.ModuleName, + // chain modules + // this line is used by starport scaffolding # stargate/app/initGenesis + }, + // SkipStoreKeys is an optional list of store keys to skip when constructing the + // module's keeper. This is useful when a module does not have a store key. + SkipStoreKeys: []string{ + "tx", }, - // When ExportGenesis is not specified, the export genesis module order - // is equal to the init genesis order - // ExportGenesis: genesisModuleOrder, - // Uncomment if you want to set a custom migration order here. - // OrderMigrations: nil, }), }, { @@ -116,24 +129,12 @@ var ( // Authority: "cosmos1cwwv22j5ca08ggdv9c2uky355k908694z577tv", // or a specific address }), }, - { - Name: "tx", - Config: appconfig.WrapAny(&txconfigv1.Config{}), - }, { Name: banktypes.ModuleName, Config: appconfig.WrapAny(&bankmodulev1.Module{ BlockedModuleAccountsOverride: blockAccAddrs, }), }, - { - Name: consensustypes.ModuleName, - Config: appconfig.WrapAny(&consensusmodulev1.Module{}), - }, - { - Name: distrtypes.ModuleName, - Config: appconfig.WrapAny(&distrmodulev1.Module{}), - }, { Name: stakingtypes.ModuleName, Config: appconfig.WrapAny(&stakingmodulev1.Module{ @@ -143,10 +144,30 @@ var ( Bech32PrefixConsensus: AccountAddressPrefix + "valcons", }), }, - { - Name: genutiltypes.ModuleName, - Config: appconfig.WrapAny(&genutilmodulev1.Module{}), - }, + { + Name: "tx", + Config: appconfig.WrapAny(&txconfigv1.Config{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + { + Name: distrtypes.ModuleName, + Config: appconfig.WrapAny(&distrmodulev1.Module{}), + }, + { + Name: consensustypes.ModuleName, + Config: appconfig.WrapAny(&consensusmodulev1.Module{}), + }, + { + Name: pooltypes.ModuleName, + Config: appconfig.WrapAny(&poolmodulev1.Module{}), + }, + { + Name: accounts.ModuleName, + Config: appconfig.WrapAny(&accountsmodulev1.Module{}), + }, // this line is used by starport scaffolding # stargate/app/moduleConfig }, }) diff --git a/ignite/templates/app/files/app/app.go.plush b/ignite/templates/app/files/app/app.go.plush index 8bf99b4886..3b80c657af 100644 --- a/ignite/templates/app/files/app/app.go.plush +++ b/ignite/templates/app/files/app/app.go.plush @@ -1,79 +1,51 @@ package app import ( + "fmt" "io" clienthelpers "cosmossdk.io/client/v2/helpers" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/registry" + corestore "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/accounts" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + authzkeeper "cosmossdk.io/x/authz/keeper" + bankkeeper "cosmossdk.io/x/bank/keeper" circuitkeeper "cosmossdk.io/x/circuit/keeper" + consensuskeeper "cosmossdk.io/x/consensus/keeper" + distrkeeper "cosmossdk.io/x/distribution/keeper" + epochskeeper "cosmossdk.io/x/epochs/keeper" evidencekeeper "cosmossdk.io/x/evidence/keeper" feegrantkeeper "cosmossdk.io/x/feegrant/keeper" - upgradekeeper "cosmossdk.io/x/upgrade/keeper" - _ "cosmossdk.io/api/cosmos/tx/config/v1" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects - _ "cosmossdk.io/x/circuit" // import for side-effects - _ "cosmossdk.io/x/evidence" // import for side-effects - _ "cosmossdk.io/x/feegrant/module" // import for side-effects - _ "cosmossdk.io/x/nft/module" // import for side-effects + govkeeper "cosmossdk.io/x/gov/keeper" + groupkeeper "cosmossdk.io/x/group/keeper" + mintkeeper "cosmossdk.io/x/mint/keeper" nftkeeper "cosmossdk.io/x/nft/keeper" - _ "cosmossdk.io/x/upgrade" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/authz/module" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/group/module" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/params" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects - _ "github.com/cosmos/ibc-go/modules/capability" // import for side-effects - _ "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" // import for side-effects - _ "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" // import for side-effects - dbm "github.com/cosmos/cosmos-db" + _ "cosmossdk.io/x/protocolpool" + poolkeeper "cosmossdk.io/x/protocolpool/keeper" + slashingkeeper "cosmossdk.io/x/slashing/keeper" + stakingkeeper "cosmossdk.io/x/staking/keeper" + upgradekeeper "cosmossdk.io/x/upgrade/keeper" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" - sdk "github.com/cosmos/cosmos-sdk/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/auth" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "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" - groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" - mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" - icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" - icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" - ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" - ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" "<%= ModulePath %>/docs" ) @@ -83,10 +55,8 @@ const ( Name = "<%= BinaryNamePrefix %>" ) -var ( - // DefaultNodeHome default home directories for the application daemon - DefaultNodeHome string -) +// DefaultNodeHome default home directories for the application daemon +var DefaultNodeHome string var ( _ runtime.AppI = (*App)(nil) @@ -98,45 +68,30 @@ var ( // capabilities aren't needed for testing. type App struct { *runtime.App - legacyAmino *codec.LegacyAmino + legacyAmino registry.AminoRegistrar appCodec codec.Codec txConfig client.TxConfig interfaceRegistry codectypes.InterfaceRegistry // keepers - AccountKeeper authkeeper.AccountKeeper + AccountsKeeper accounts.Keeper + AuthKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper StakingKeeper *stakingkeeper.Keeper - DistrKeeper distrkeeper.Keeper - ConsensusParamsKeeper consensuskeeper.Keeper - SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper + DistrKeeper distrkeeper.Keeper GovKeeper *govkeeper.Keeper - CrisisKeeper *crisiskeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper AuthzKeeper authzkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper GroupKeeper groupkeeper.Keeper NFTKeeper nftkeeper.Keeper + ConsensusParamsKeeper consensuskeeper.Keeper CircuitBreakerKeeper circuitkeeper.Keeper - - // IBC - IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - CapabilityKeeper *capabilitykeeper.Keeper - IBCFeeKeeper ibcfeekeeper.Keeper - ICAControllerKeeper icacontrollerkeeper.Keeper - ICAHostKeeper icahostkeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - - // Scoped IBC - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedIBCTransferKeeper capabilitykeeper.ScopedKeeper - ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper - ScopedICAHostKeeper capabilitykeeper.ScopedKeeper - ScopedKeepers map[string]capabilitykeeper.ScopedKeeper + PoolKeeper poolkeeper.Keeper + EpochsKeeper *epochskeeper.Keeper // this line is used by starport scaffolding # stargate/app/keeperDeclaration @@ -153,47 +108,24 @@ func init() { } } -// getGovProposalHandlers return the chain proposal handlers. -func getGovProposalHandlers() []govclient.ProposalHandler { - var govProposalHandlers []govclient.ProposalHandler - // this line is used by starport scaffolding # stargate/app/govProposalHandlers - - govProposalHandlers = append(govProposalHandlers, - paramsclient.ProposalHandler, - // this line is used by starport scaffolding # stargate/app/govProposalHandler - ) - - return govProposalHandlers -} - // AppConfig returns the default app config. func AppConfig() depinject.Config { return depinject.Configs( appConfig, - // Alternatively, load the app config from a YAML file. - // appconfig.LoadYAML(AppConfigYAML), - depinject.Supply( - // supply custom module basics - map[string]module.AppModuleBasic{ - genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), - govtypes.ModuleName: gov.NewAppModuleBasic(getGovProposalHandlers()), - // this line is used by starport scaffolding # stargate/appConfig/moduleBasic - }, - ), ) } // New returns a reference to an initialized App. func New( logger log.Logger, - db dbm.DB, + db corestore.KVStoreWithBatch, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), -) (*App, error) { +) *App { var ( - app = &App{ScopedKeepers: make(map[string]capabilitykeeper.ScopedKeeper)} + app = &App{} appBuilder *runtime.AppBuilder // merge the AppConfig and other configuration in one config @@ -202,13 +134,6 @@ func New( depinject.Supply( appOpts, // supply app options logger, // supply logger - // Supply with IBC keeper getter for the IBC modules with App Wiring. - // The IBC Keeper cannot be passed because it has not been initiated yet. - // Passing the getter, the app IBC Keeper will always be accessible. - // This needs to be removed after IBC supports App Wiring. - app.GetIBCKeeper, - app.GetCapabilityScopedKeeper, - // here alternative options can be supplied to the DI container. // those options can be used f.e to override the default behavior of some modules. // for instance supplying a custom address codec for not using bech32 addresses. @@ -218,30 +143,32 @@ func New( ) ) + var appModules map[string]appmodule.AppModule if err := depinject.Inject(appConfig, &appBuilder, + &appModules, &app.appCodec, &app.legacyAmino, &app.txConfig, &app.interfaceRegistry, - &app.AccountKeeper, + &app.AuthKeeper, + &app.AccountsKeeper, &app.BankKeeper, &app.StakingKeeper, - &app.DistrKeeper, - &app.ConsensusParamsKeeper, &app.SlashingKeeper, &app.MintKeeper, + &app.DistrKeeper, &app.GovKeeper, - &app.CrisisKeeper, &app.UpgradeKeeper, - &app.ParamsKeeper, &app.AuthzKeeper, &app.EvidenceKeeper, &app.FeeGrantKeeper, - &app.NFTKeeper, &app.GroupKeeper, + &app.NFTKeeper, + &app.ConsensusParamsKeeper, &app.CircuitBreakerKeeper, - + &app.PoolKeeper, + &app.EpochsKeeper, ); err != nil { panic(err) } @@ -253,43 +180,41 @@ func New( // build app app.App = appBuilder.Build(db, traceStore, baseAppOptions...) - // register legacy modules - if err := app.registerIBCModules(appOpts); err != nil { - return nil, err - } - - // register streaming services - if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { - return nil, err - } - /**** Module Options ****/ - app.ModuleManager.RegisterInvariants(app.CrisisKeeper) - // create the simulation manager and define the order of the modules for deterministic simulations overrideModules := map[string]module.AppModuleSimulation{ - authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), + authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AuthKeeper, &app.AccountsKeeper, authsims.RandomGenesisAccounts, nil), } app.sm = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, overrideModules) + app.sm.RegisterStoreDecoders() // A custom InitChainer sets if extra pre-init-genesis logic is required. // This is necessary for manually registered modules that do not support app wiring. // Manually set the module version map as shown below. // The upgrade module will automatically handle de-duplication of the module version map. - app.SetInitChainer(func(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { + app.SetInitChainer(func(ctx sdk.Context, req *abci.InitChainRequest) (*abci.InitChainResponse, error) { if err := app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()); err != nil { return nil, err } return app.App.InitChainer(ctx, req) }) + // register custom snapshot extensions (if any) + if manager := app.SnapshotManager(); manager != nil { + if err := manager.RegisterExtensions( + unorderedtx.NewSnapshotter(app.UnorderedTxManager), + ); err != nil { + panic(fmt.Errorf("failed to register snapshot extension: %w", err)) + } + } + if err := app.Load(loadLatest); err != nil { - return nil, err + panic(err) } - return app, nil + return app } // LegacyAmino returns App's amino codec. @@ -297,7 +222,12 @@ func New( // 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 *App) LegacyAmino() *codec.LegacyAmino { - return app.legacyAmino + switch cdc := app.legacyAmino.(type) { + case *codec.LegacyAmino: + return cdc + default: + panic("unexpected codec type") + } } // AppCodec returns App's app codec. @@ -308,69 +238,17 @@ func (app *App) AppCodec() codec.Codec { return app.appCodec } -// InterfaceRegistry returns App's interfaceRegistry. +// InterfaceRegistry returns App's InterfaceRegistry. func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry { return app.interfaceRegistry } -// TxConfig returns App's tx config. +// TxConfig returns App's TxConfig func (app *App) TxConfig() client.TxConfig { return app.txConfig } -// GetKey returns the KVStoreKey for the provided store key. -func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey { - kvStoreKey, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.KVStoreKey) - if !ok { - return nil - } - return kvStoreKey -} - -// GetMemKey returns the MemoryStoreKey for the provided store key. -func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { - key, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.MemoryStoreKey) - if !ok { - return nil - } - - return key -} - -// kvStoreKeys returns all the kv store keys registered inside App. -func (app *App) kvStoreKeys() map[string]*storetypes.KVStoreKey { - keys := make(map[string]*storetypes.KVStoreKey) - for _, k := range app.GetStoreKeys() { - if kv, ok := k.(*storetypes.KVStoreKey); ok { - keys[kv.Name()] = kv - } - } - - return keys -} - -// GetSubspace returns a param subspace for a given module name. -func (app *App) GetSubspace(moduleName string) paramstypes.Subspace { - subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) - return subspace -} - -// GetIBCKeeper returns the IBC keeper. -func (app *App) GetIBCKeeper() *ibckeeper.Keeper { - return app.IBCKeeper -} - -// GetCapabilityScopedKeeper returns the capability scoped keeper. -func (app *App) GetCapabilityScopedKeeper(moduleName string) capabilitykeeper.ScopedKeeper { - sk, ok := app.ScopedKeepers[moduleName] - if !ok { - sk = app.CapabilityKeeper.ScopeToModule(moduleName) - app.ScopedKeepers[moduleName] = sk - } - return sk -} - -// SimulationManager implements the SimulationApp interface. +// SimulationManager implements the SimulationApp interface func (app *App) SimulationManager() *module.SimulationManager { return app.sm } @@ -396,12 +274,14 @@ func GetMaccPerms() map[string][]string { for _, perms := range moduleAccPerms { dup[perms.Account] = perms.Permissions } + return dup } // BlockedAddresses returns all the app's blocked account addresses. func BlockedAddresses() map[string]bool { result := make(map[string]bool) + if len(blockAccAddrs) > 0 { for _, addr := range blockAccAddrs { result[addr] = true @@ -411,5 +291,6 @@ func BlockedAddresses() map[string]bool { result[addr] = true } } + return result } \ No newline at end of file diff --git a/ignite/templates/app/files/app/app_config.go.plush b/ignite/templates/app/files/app/app_config.go.plush index 9f49b41f09..31c6881947 100644 --- a/ignite/templates/app/files/app/app_config.go.plush +++ b/ignite/templates/app/files/app/app_config.go.plush @@ -3,6 +3,9 @@ package app import ( "time" + "google.golang.org/protobuf/types/known/durationpb" + + accountsmodulev1 "cosmossdk.io/api/cosmos/accounts/module/v1" runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" @@ -10,8 +13,8 @@ import ( bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" circuitmodulev1 "cosmossdk.io/api/cosmos/circuit/module/v1" consensusmodulev1 "cosmossdk.io/api/cosmos/consensus/module/v1" - crisismodulev1 "cosmossdk.io/api/cosmos/crisis/module/v1" distrmodulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" + epochsmodulev1 "cosmossdk.io/api/cosmos/epochs/module/v1" evidencemodulev1 "cosmossdk.io/api/cosmos/evidence/module/v1" feegrantmodulev1 "cosmossdk.io/api/cosmos/feegrant/module/v1" genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" @@ -19,137 +22,66 @@ import ( groupmodulev1 "cosmossdk.io/api/cosmos/group/module/v1" mintmodulev1 "cosmossdk.io/api/cosmos/mint/module/v1" nftmodulev1 "cosmossdk.io/api/cosmos/nft/module/v1" - paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + poolmodulev1 "cosmossdk.io/api/cosmos/protocolpool/module/v1" slashingmodulev1 "cosmossdk.io/api/cosmos/slashing/module/v1" stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" upgrademodulev1 "cosmossdk.io/api/cosmos/upgrade/module/v1" - vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" "cosmossdk.io/depinject/appconfig" + "cosmossdk.io/x/accounts" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "cosmossdk.io/x/authz" + _ "cosmossdk.io/x/authz/module" // import for side-effects + _ "cosmossdk.io/x/bank" // import for side-effects + banktypes "cosmossdk.io/x/bank/types" + _ "cosmossdk.io/x/circuit" // import for side-effects circuittypes "cosmossdk.io/x/circuit/types" + _ "cosmossdk.io/x/consensus" // import for side-effects + consensustypes "cosmossdk.io/x/consensus/types" + _ "cosmossdk.io/x/distribution" // import for side-effects + distrtypes "cosmossdk.io/x/distribution/types" + _ "cosmossdk.io/x/epochs" // import for side-effects + epochstypes "cosmossdk.io/x/epochs/types" + _ "cosmossdk.io/x/evidence" // import for side-effects evidencetypes "cosmossdk.io/x/evidence/types" "cosmossdk.io/x/feegrant" + _ "cosmossdk.io/x/feegrant/module" // import for side-effects + _ "cosmossdk.io/x/gov" // import for side-effects + govtypes "cosmossdk.io/x/gov/types" + "cosmossdk.io/x/group" + _ "cosmossdk.io/x/group/module" // import for side-effects + _ "cosmossdk.io/x/mint" // import for side-effects + minttypes "cosmossdk.io/x/mint/types" "cosmossdk.io/x/nft" + _ "cosmossdk.io/x/nft/module" // import for side-effects + _ "cosmossdk.io/x/protocolpool" // import for side-effects + pooltypes "cosmossdk.io/x/protocolpool/types" + _ "cosmossdk.io/x/slashing" // import for side-effects + slashingtypes "cosmossdk.io/x/slashing/types" + _ "cosmossdk.io/x/staking" // import for side-effects + stakingtypes "cosmossdk.io/x/staking/types" + _ "cosmossdk.io/x/upgrade" // import for side-effects upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/runtime" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/cosmos/cosmos-sdk/x/authz" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + _ "github.com/cosmos/cosmos-sdk/testutil/x/counter" // import for side-effects genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/cosmos-sdk/x/group" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" - ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - "google.golang.org/protobuf/types/known/durationpb" ) var ( - // NOTE: The genutils module must occur after staking so that pools are - // properly initialized with tokens from genesis accounts. - // NOTE: The genutils module must also occur after auth so that it can access the params from auth. - // NOTE: Capability module must occur first so that it can initialize any capabilities - // so that other modules that want to create or claim capabilities afterwards in InitChain - // can do so safely. - genesisModuleOrder = []string{ - // cosmos-sdk/ibc modules - capabilitytypes.ModuleName, - authtypes.ModuleName, - banktypes.ModuleName, - distrtypes.ModuleName, - stakingtypes.ModuleName, - slashingtypes.ModuleName, - govtypes.ModuleName, - minttypes.ModuleName, - crisistypes.ModuleName, - ibcexported.ModuleName, - genutiltypes.ModuleName, - evidencetypes.ModuleName, - authz.ModuleName, - ibctransfertypes.ModuleName, - icatypes.ModuleName, - ibcfeetypes.ModuleName, - feegrant.ModuleName, - paramstypes.ModuleName, - upgradetypes.ModuleName, - vestingtypes.ModuleName, - nft.ModuleName, - group.ModuleName, - consensustypes.ModuleName, - circuittypes.ModuleName, - // chain modules - // this line is used by starport scaffolding # stargate/app/initGenesis - } - - // During begin block slashing happens after distr.BeginBlocker so that - // there is nothing left over in the validator fee pool, so as to keep the - // CanWithdrawInvariant invariant. - // NOTE: staking module is required if HistoricalEntries param > 0 - // NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC) - beginBlockers = []string{ - // cosmos sdk modules - minttypes.ModuleName, - distrtypes.ModuleName, - slashingtypes.ModuleName, - evidencetypes.ModuleName, - stakingtypes.ModuleName, - authz.ModuleName, - genutiltypes.ModuleName, - // ibc modules - capabilitytypes.ModuleName, - ibcexported.ModuleName, - ibctransfertypes.ModuleName, - icatypes.ModuleName, - ibcfeetypes.ModuleName, - // chain modules - // this line is used by starport scaffolding # stargate/app/beginBlockers - } - - endBlockers = []string{ - // cosmos sdk modules - crisistypes.ModuleName, - govtypes.ModuleName, - stakingtypes.ModuleName, - feegrant.ModuleName, - group.ModuleName, - genutiltypes.ModuleName, - // ibc modules - ibcexported.ModuleName, - ibctransfertypes.ModuleName, - capabilitytypes.ModuleName, - icatypes.ModuleName, - ibcfeetypes.ModuleName, - // chain modules - // this line is used by starport scaffolding # stargate/app/endBlockers - } - - preBlockers = []string{ - upgradetypes.ModuleName, - // this line is used by starport scaffolding # stargate/app/preBlockers - } - // module account permissions moduleAccPerms = []*authmodulev1.ModuleAccountPermission{ {Account: authtypes.FeeCollectorName}, {Account: distrtypes.ModuleName}, + {Account: pooltypes.ModuleName}, + {Account: pooltypes.StreamAccount}, + {Account: pooltypes.ProtocolPoolDistrAccount}, {Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}}, {Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, {Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}}, {Account: govtypes.ModuleName, Permissions: []string{authtypes.Burner}}, {Account: nft.ModuleName}, - {Account: ibctransfertypes.ModuleName, Permissions: []string{authtypes.Minter, authtypes.Burner}}, - {Account: ibcfeetypes.ModuleName}, - {Account: icatypes.ModuleName}, // this line is used by starport scaffolding # stargate/app/maccPerms } @@ -163,30 +95,88 @@ var ( nft.ModuleName, // We allow the following module accounts to receive funds: // govtypes.ModuleName + // pooltypes.ModuleName } - // appConfig application configuration (used by depinject) + // application configuration (used by depinject) appConfig = appconfig.Compose(&appv1alpha1.Config{ Modules: []*appv1alpha1.ModuleConfig{ { Name: runtime.ModuleName, Config: appconfig.WrapAny(&runtimev1alpha1.Module{ - AppName: Name, - PreBlockers: preBlockers, - BeginBlockers: beginBlockers, - EndBlockers: endBlockers, - InitGenesis: genesisModuleOrder, + AppName: Name, + // NOTE: upgrade module is required to be prioritized + PreBlockers: []string{ + upgradetypes.ModuleName, + // this line is used by starport scaffolding # stargate/app/preBlockers + }, + // During begin block slashing happens after distr.BeginBlocker so that + // there is nothing left over in the validator fee pool, so as to keep the + // CanWithdrawInvariant invariant. + // NOTE: staking module is required if HistoricalEntries param > 0 + BeginBlockers: []string{ + minttypes.ModuleName, + distrtypes.ModuleName, + pooltypes.ModuleName, + slashingtypes.ModuleName, + evidencetypes.ModuleName, + stakingtypes.ModuleName, + authz.ModuleName, + epochstypes.ModuleName, + // chain modules + // this line is used by starport scaffolding # stargate/app/beginBlockers + }, + EndBlockers: []string{ + govtypes.ModuleName, + stakingtypes.ModuleName, + feegrant.ModuleName, + group.ModuleName, + pooltypes.ModuleName, + // chain modules + // this line is used by starport scaffolding # stargate/app/endBlockers + }, + // The following is mostly only needed when ModuleName != StoreKey name. OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ { ModuleName: authtypes.ModuleName, KvStoreKey: "acc", }, + { + ModuleName: accounts.ModuleName, + KvStoreKey: accounts.StoreKey, + }, + }, + // NOTE: The genutils module must occur after staking so that pools are + // properly initialized with tokens from genesis accounts. + // NOTE: The genutils module must also occur after auth so that it can access the params from auth. + InitGenesis: []string{ + consensustypes.ModuleName, + accounts.ModuleName, + authtypes.ModuleName, + banktypes.ModuleName, + distrtypes.ModuleName, + stakingtypes.ModuleName, + slashingtypes.ModuleName, + govtypes.ModuleName, + minttypes.ModuleName, + genutiltypes.ModuleName, + evidencetypes.ModuleName, + authz.ModuleName, + feegrant.ModuleName, + nft.ModuleName, + group.ModuleName, + upgradetypes.ModuleName, + circuittypes.ModuleName, + pooltypes.ModuleName, + epochstypes.ModuleName, + // chain modules + // this line is used by starport scaffolding # stargate/app/initGenesis + }, + // SkipStoreKeys is an optional list of store keys to skip when constructing the + // module's keeper. This is useful when a module does not have a store key. + SkipStoreKeys: []string{ + "tx", }, - // When ExportGenesis is not specified, the export genesis module order - // is equal to the init genesis order - // ExportGenesis: genesisModuleOrder, - // Uncomment if you want to set a custom migration order here. - // OrderMigrations: nil, }), }, { @@ -199,14 +189,6 @@ var ( // Authority: "cosmos1cwwv22j5ca08ggdv9c2uky355k908694z577tv", // or a specific address }), }, - { - Name: nft.ModuleName, - Config: appconfig.WrapAny(&nftmodulev1.Module{}), - }, - { - Name: vestingtypes.ModuleName, - Config: appconfig.WrapAny(&vestingmodulev1.Module{}), - }, { Name: banktypes.ModuleName, Config: appconfig.WrapAny(&bankmodulev1.Module{ @@ -215,76 +197,79 @@ var ( }, { Name: stakingtypes.ModuleName, - Config: appconfig.WrapAny(&stakingmodulev1.Module{ - // NOTE: specifying a prefix is only necessary when using bech32 addresses - // If not specfied, the auth Bech32Prefix appended with "valoper" and "valcons" is used by default - Bech32PrefixValidator: AccountAddressPrefix + "valoper", - Bech32PrefixConsensus: AccountAddressPrefix + "valcons", + Config: appconfig.WrapAny(&stakingmodulev1.Module{}), + }, + { + Name: slashingtypes.ModuleName, + Config: appconfig.WrapAny(&slashingmodulev1.Module{}), + }, + { + Name: "tx", + Config: appconfig.WrapAny(&txconfigv1.Config{}), + }, + { + Name: genutiltypes.ModuleName, + Config: appconfig.WrapAny(&genutilmodulev1.Module{}), + }, + { + Name: authz.ModuleName, + Config: appconfig.WrapAny(&authzmodulev1.Module{}), + }, + { + Name: upgradetypes.ModuleName, + Config: appconfig.WrapAny(&upgrademodulev1.Module{}), + }, + { + Name: distrtypes.ModuleName, + Config: appconfig.WrapAny(&distrmodulev1.Module{}), + }, + { + Name: evidencetypes.ModuleName, + Config: appconfig.WrapAny(&evidencemodulev1.Module{}), + }, + { + Name: minttypes.ModuleName, + Config: appconfig.WrapAny(&mintmodulev1.Module{}), + }, + { + Name: group.ModuleName, + Config: appconfig.WrapAny(&groupmodulev1.Module{ + MaxExecutionPeriod: durationpb.New(time.Second * 1209600), + MaxMetadataLen: 255, }), }, { - Name: slashingtypes.ModuleName, - Config: appconfig.WrapAny(&slashingmodulev1.Module{}), - }, - { - Name: paramstypes.ModuleName, - Config: appconfig.WrapAny(¶msmodulev1.Module{}), - }, - { - Name: "tx", - Config: appconfig.WrapAny(&txconfigv1.Config{}), - }, - { - Name: genutiltypes.ModuleName, - Config: appconfig.WrapAny(&genutilmodulev1.Module{}), - }, - { - Name: authz.ModuleName, - Config: appconfig.WrapAny(&authzmodulev1.Module{}), - }, - { - Name: upgradetypes.ModuleName, - Config: appconfig.WrapAny(&upgrademodulev1.Module{}), - }, - { - Name: distrtypes.ModuleName, - Config: appconfig.WrapAny(&distrmodulev1.Module{}), - }, - { - Name: evidencetypes.ModuleName, - Config: appconfig.WrapAny(&evidencemodulev1.Module{}), - }, - { - Name: minttypes.ModuleName, - Config: appconfig.WrapAny(&mintmodulev1.Module{}), - }, - { - Name: group.ModuleName, - Config: appconfig.WrapAny(&groupmodulev1.Module{ - MaxExecutionPeriod: durationpb.New(time.Second * 1209600), - MaxMetadataLen: 255, - }), - }, - { - Name: feegrant.ModuleName, - Config: appconfig.WrapAny(&feegrantmodulev1.Module{}), - }, - { - Name: govtypes.ModuleName, - Config: appconfig.WrapAny(&govmodulev1.Module{}), - }, - { - Name: crisistypes.ModuleName, - Config: appconfig.WrapAny(&crisismodulev1.Module{}), - }, - { - Name: consensustypes.ModuleName, - Config: appconfig.WrapAny(&consensusmodulev1.Module{}), - }, - { - Name: circuittypes.ModuleName, - Config: appconfig.WrapAny(&circuitmodulev1.Module{}), - }, + Name: nft.ModuleName, + Config: appconfig.WrapAny(&nftmodulev1.Module{}), + }, + { + Name: feegrant.ModuleName, + Config: appconfig.WrapAny(&feegrantmodulev1.Module{}), + }, + { + Name: govtypes.ModuleName, + Config: appconfig.WrapAny(&govmodulev1.Module{}), + }, + { + Name: consensustypes.ModuleName, + Config: appconfig.WrapAny(&consensusmodulev1.Module{}), + }, + { + Name: circuittypes.ModuleName, + Config: appconfig.WrapAny(&circuitmodulev1.Module{}), + }, + { + Name: pooltypes.ModuleName, + Config: appconfig.WrapAny(&poolmodulev1.Module{}), + }, + { + Name: accounts.ModuleName, + Config: appconfig.WrapAny(&accountsmodulev1.Module{}), + }, + { + Name: epochstypes.ModuleName, + Config: appconfig.WrapAny(&epochsmodulev1.Module{}), + }, // this line is used by starport scaffolding # stargate/app/moduleConfig }, }) diff --git a/ignite/templates/app/files/app/export.go.plush b/ignite/templates/app/files/app/export.go.plush index c543f5b80b..2da9d0a75d 100644 --- a/ignite/templates/app/files/app/export.go.plush +++ b/ignite/templates/app/files/app/export.go.plush @@ -5,13 +5,16 @@ import ( "fmt" "log" + cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" + + "cosmossdk.io/collections" storetypes "cosmossdk.io/store/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + slashingtypes "cosmossdk.io/x/slashing/types" + "cosmossdk.io/x/staking" + stakingtypes "cosmossdk.io/x/staking/types" + servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - "github.com/cosmos/cosmos-sdk/x/staking" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // ExportAppStateAndValidators exports the state of the application for a genesis @@ -28,7 +31,7 @@ func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState, err := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + genState, err := app.ModuleManager.ExportGenesisForModules(ctx, modulesToExport) if err != nil { return servertypes.ExportedApp{}, err } @@ -39,6 +42,10 @@ func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs } validators, err := staking.WriteValidators(ctx, app.StakingKeeper) + if err != nil { + return servertypes.ExportedApp{}, err + } + return servertypes.ExportedApp{ AppState: appState, Validators: validators, @@ -69,15 +76,10 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str allowedAddrsMap[addr] = true } -<%= if (!IsChainMinimal) { %> - /* Just to be safe, assert the invariants on current state. */ - app.CrisisKeeper.AssertInvariants(ctx) -<% } %> - /* Handle fee distribution state. */ // withdraw all validator commission - err := app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + err := app.StakingKeeper.IterateValidators(ctx, func(_ int64, val sdk.ValidatorI) (stop bool) { valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) if err != nil { panic(err) @@ -107,23 +109,29 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str } // clear validator slash events - app.DistrKeeper.DeleteAllValidatorSlashEvents(ctx) + err = app.DistrKeeper.ValidatorSlashEvents.Clear(ctx, nil) + if err != nil { + panic(err) + } // clear validator historical rewards - app.DistrKeeper.DeleteAllValidatorHistoricalRewards(ctx) + err = app.DistrKeeper.ValidatorHistoricalRewards.Clear(ctx, nil) + if err != nil { + panic(err) + } // set context height to zero height := ctx.BlockHeight() ctx = ctx.WithBlockHeight(0) // reinitialize all validators - err = app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + err = app.StakingKeeper.IterateValidators(ctx, func(_ int64, val sdk.ValidatorI) (stop bool) { valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) if err != nil { panic(err) } - // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valBz) + // donate any unwithdrawn outstanding reward tokens to the community pool + rewards, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valBz) if err != nil { panic(err) } @@ -131,7 +139,7 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str if err != nil { panic(err) } - feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) + feePool.DecimalPool = feePool.DecimalPool.Add(rewards...) // distribution will allocate this to the protocolpool eventually if err := app.DistrKeeper.FeePool.Set(ctx, feePool); err != nil { panic(err) } @@ -141,6 +149,9 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str } return false }) + if err != nil { + panic(err) + } // reinitialize all delegations for _, del := range dels { @@ -180,22 +191,25 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str if err != nil { panic(err) } - + // iterate through unbonding delegations, reset creation height - err = app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { - for i := range ubd.Entries { - ubd.Entries[i].CreationHeight = 0 - } - err = app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) - if err != nil { - panic(err) - } - return false - }) + err = app.StakingKeeper.UnbondingDelegations.Walk( + ctx, + nil, + func(key collections.Pair[[]byte, []byte], ubd stakingtypes.UnbondingDelegation) (stop bool, err error) { + for i := range ubd.Entries { + ubd.Entries[i].CreationHeight = 0 + } + err = app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + if err != nil { + return true, err + } + return false, err + }, + ) if err != nil { panic(err) } - // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. store := ctx.KVStore(app.GetKey(stakingtypes.StoreKey)) @@ -214,7 +228,7 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str validator.Jailed = true } - if err := app.StakingKeeper.SetValidator(ctx, validator); err != nil { + if err = app.StakingKeeper.SetValidator(ctx, validator); err != nil { panic(err) } counter++ @@ -234,15 +248,16 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str /* Handle slashing state. */ // reset start height on signing infos - if err := app.SlashingKeeper.IterateValidatorSigningInfos( - ctx, - func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) { - info.StartHeight = 0 - _ = app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info) - return false - }, - ); err != nil { - log.Fatal(err) + err = app.SlashingKeeper.ValidatorSigningInfo.Walk(ctx, nil, func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool, err error) { + info.StartHeight = 0 + err = app.SlashingKeeper.ValidatorSigningInfo.Set(ctx, addr, info) + if err != nil { + return true, err + } + return false, nil + }) + if err != nil { + panic(err) } <% } %> } diff --git a/ignite/templates/app/files/app/ibc.go.plush b/ignite/templates/app/files/app/ibc.go.plush deleted file mode 100644 index 2842a7f83f..0000000000 --- a/ignite/templates/app/files/app/ibc.go.plush +++ /dev/null @@ -1,206 +0,0 @@ -package app - -import ( - "cosmossdk.io/core/appmodule" - storetypes "cosmossdk.io/store/types" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/types/module" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/cosmos/ibc-go/modules/capability" - capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - icamodule "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" - icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" - icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" - ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" - ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" - ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" - ibctransfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v8/modules/core" - ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" // nolint:staticcheck // Deprecated: params key table is needed for params migration - ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" - porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - solomachine "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine" - ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" -) - -// registerIBCModules register IBC keepers and non dependency inject modules. -func (app *App) registerIBCModules(appOpts servertypes.AppOptions) error { - // set up non depinject support modules store keys - if err := app.RegisterStores( - storetypes.NewKVStoreKey(capabilitytypes.StoreKey), - storetypes.NewKVStoreKey(ibcexported.StoreKey), - storetypes.NewKVStoreKey(ibctransfertypes.StoreKey), - storetypes.NewKVStoreKey(ibcfeetypes.StoreKey), - storetypes.NewKVStoreKey(icahosttypes.StoreKey), - storetypes.NewKVStoreKey(icacontrollertypes.StoreKey), - storetypes.NewMemoryStoreKey(capabilitytypes.MemStoreKey), - storetypes.NewTransientStoreKey(paramstypes.TStoreKey), - ); err != nil { - return err - } - - // register the key tables for legacy param subspaces - keyTable := ibcclienttypes.ParamKeyTable() - keyTable.RegisterParamSet(&ibcconnectiontypes.Params{}) - app.ParamsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(keyTable) - app.ParamsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable()) - app.ParamsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable()) - app.ParamsKeeper.Subspace(icahosttypes.SubModuleName).WithKeyTable(icahosttypes.ParamKeyTable()) - - // add capability keeper and ScopeToModule for ibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper( - app.AppCodec(), - app.GetKey(capabilitytypes.StoreKey), - app.GetMemKey(capabilitytypes.MemStoreKey), - ) - - // add capability keeper and ScopeToModule for ibc module - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) - scopedIBCTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - scopedICAControllerKeeper := app.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName) - scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) - - // Create IBC keeper - app.IBCKeeper = ibckeeper.NewKeeper( - app.appCodec, - app.GetKey(ibcexported.StoreKey), - app.GetSubspace(ibcexported.ModuleName), - app.StakingKeeper, - app.UpgradeKeeper, - scopedIBCKeeper, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - - // 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://docs.cosmos.network/main/modules/gov#proposal-messages - govRouter := govv1beta1.NewRouter() - govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler) - - app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( - app.appCodec, app.GetKey(ibcfeetypes.StoreKey), - app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware - app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, - ) - - // Create IBC transfer keeper - app.TransferKeeper = ibctransferkeeper.NewKeeper( - app.appCodec, - app.GetKey(ibctransfertypes.StoreKey), - app.GetSubspace(ibctransfertypes.ModuleName), - app.IBCFeeKeeper, - app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.PortKeeper, - app.AccountKeeper, - app.BankKeeper, - scopedIBCTransferKeeper, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - - // Create interchain account keepers - app.ICAHostKeeper = icahostkeeper.NewKeeper( - app.appCodec, - app.GetKey(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(), - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - app.ICAHostKeeper.WithQueryRouter(app.GRPCQueryRouter()) - - app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper( - app.appCodec, - app.GetKey(icacontrollertypes.StoreKey), - app.GetSubspace(icacontrollertypes.SubModuleName), - app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack - app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.PortKeeper, - scopedICAControllerKeeper, - app.MsgServiceRouter(), - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - app.GovKeeper.SetLegacyRouter(govRouter) - - // Create IBC modules with ibcfee middleware - transferIBCModule := ibcfee.NewIBCMiddleware(ibctransfer.NewIBCModule(app.TransferKeeper), app.IBCFeeKeeper) - - // integration point for custom authentication modules - var noAuthzModule porttypes.IBCModule - icaControllerIBCModule := ibcfee.NewIBCMiddleware( - icacontroller.NewIBCMiddleware(noAuthzModule, app.ICAControllerKeeper), - app.IBCFeeKeeper, - ) - - icaHostIBCModule := ibcfee.NewIBCMiddleware(icahost.NewIBCModule(app.ICAHostKeeper), app.IBCFeeKeeper) - - // Create static IBC router, add transfer route, then set and seal it - ibcRouter := porttypes.NewRouter(). - AddRoute(ibctransfertypes.ModuleName, transferIBCModule). - AddRoute(icacontrollertypes.SubModuleName, icaControllerIBCModule). - AddRoute(icahosttypes.SubModuleName, icaHostIBCModule) - - // this line is used by starport scaffolding # ibc/app/module - - app.IBCKeeper.SetRouter(ibcRouter) - - app.ScopedIBCKeeper = scopedIBCKeeper - app.ScopedIBCTransferKeeper = scopedIBCTransferKeeper - app.ScopedICAHostKeeper = scopedICAHostKeeper - app.ScopedICAControllerKeeper = scopedICAControllerKeeper - - // register IBC modules - if err := app.RegisterModules( - ibc.NewAppModule(app.IBCKeeper), - ibctransfer.NewAppModule(app.TransferKeeper), - ibcfee.NewAppModule(app.IBCFeeKeeper), - icamodule.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), - capability.NewAppModule(app.appCodec, *app.CapabilityKeeper, false), - ibctm.NewAppModule(), - solomachine.NewAppModule(), - ); err != nil { - return err - } - - return nil -} - -// RegisterIBC Since the IBC modules don't support dependency injection, -// we need to manually register the modules on the client side. -// This needs to be removed after IBC supports App Wiring. -func RegisterIBC(registry cdctypes.InterfaceRegistry) map[string]appmodule.AppModule { - modules := map[string]appmodule.AppModule{ - ibcexported.ModuleName: ibc.AppModule{}, - ibctransfertypes.ModuleName: ibctransfer.AppModule{}, - ibcfeetypes.ModuleName: ibcfee.AppModule{}, - icatypes.ModuleName: icamodule.AppModule{}, - capabilitytypes.ModuleName: capability.AppModule{}, - ibctm.ModuleName: ibctm.AppModule{}, - solomachine.ModuleName: solomachine.AppModule{}, - } - - for name, m := range modules { - module.CoreAppModuleBasicAdaptor(name, m).RegisterInterfaces(registry) - } - - return modules -} \ No newline at end of file diff --git a/ignite/templates/app/files/app/sim_bench_test.go.plush b/ignite/templates/app/files/app/sim_bench_test.go.plush index 72c361845b..88cb646e6e 100644 --- a/ignite/templates/app/files/app/sim_bench_test.go.plush +++ b/ignite/templates/app/files/app/sim_bench_test.go.plush @@ -1,152 +1,22 @@ -package app_test +//go:build sims + +package app import ( - "fmt" - "os" "testing" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/server" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" - simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" - "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/simsx" - "<%= ModulePath %>/app" + simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" ) // Profile with: -// `go test -benchmem -run=^$ -bench ^BenchmarkFullAppSimulation ./app -Commit=true -cpuprofile cpu.out` +// `go test -benchmem -run=^$ ./app -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out` func BenchmarkFullAppSimulation(b *testing.B) { b.ReportAllocs() config := simcli.NewConfigFromFlags() - config.ChainID = SimAppChainID - - db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "goleveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) - if err != nil { - b.Fatalf("simulation setup failed: %s", err.Error()) - } - - if skip { - b.Skip("skipping benchmark application simulation") - } - - defer func() { - require.NoError(b, db.Close()) - require.NoError(b, os.RemoveAll(dir)) - }() - - appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = app.DefaultNodeHome - appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue - - bApp, err := app.New(logger, db, nil, true, appOptions, interBlockCacheOpt()) - require.NoError(b, err) - require.Equal(b, app.Name, bApp.Name()) - - // run randomized simulation - _, simParams, simErr := simulation.SimulateFromSeed( - b, - os.Stdout, - bApp.BaseApp, - simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), - simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), - app.BlockedAddresses(), - config, - bApp.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - if err = simtestutil.CheckExportSimulation(bApp, config, simParams); err != nil { - b.Fatal(err) - } - - if simErr != nil { - b.Fatal(simErr) - } - - if config.Commit { - simtestutil.PrintStats(db) - } -} - -<%= if (!IsChainMinimal) { %> -func BenchmarkInvariants(b *testing.B) { - b.ReportAllocs() - - config := simcli.NewConfigFromFlags() - config.ChainID = SimAppChainID - - db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-invariant-bench", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) - if err != nil { - b.Fatalf("simulation setup failed: %s", err.Error()) - } - - if skip { - b.Skip("skipping benchmark application simulation") - } - - config.AllInvariants = false - - defer func() { - require.NoError(b, db.Close()) - require.NoError(b, os.RemoveAll(dir)) - }() - - appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = app.DefaultNodeHome - appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue - - bApp, err := app.New(logger, db, nil, true, appOptions, interBlockCacheOpt()) - require.NoError(b, err) - require.Equal(b, app.Name, bApp.Name()) - - // run randomized simulation - _, simParams, simErr := simulation.SimulateFromSeed( - b, - os.Stdout, - bApp.BaseApp, - simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), - simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), - app.BlockedAddresses(), - config, - bApp.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - if err = simtestutil.CheckExportSimulation(bApp, config, simParams); err != nil { - b.Fatal(err) - } - - if simErr != nil { - b.Fatal(simErr) - } - - if config.Commit { - simtestutil.PrintStats(db) - } - - ctx := bApp.NewContextLegacy(true, cmtproto.Header{Height: bApp.LastBlockHeight() + 1}) + config.ChainID = simsx.SimAppChainID - // 3. Benchmark each invariant separately - // - // NOTE: We use the crisis keeper as it has all the invariants registered with - // their respective metadata which makes it useful for testing/benchmarking. - for _, cr := range bApp.CrisisKeeper.Routes() { - cr := cr - b.Run(fmt.Sprintf("%s/%s", cr.ModuleName, cr.Route), func(b *testing.B) { - if res, stop := cr.Invar(ctx); stop { - b.Fatalf( - "broken invariant at block %d of %d\n%s", - ctx.BlockHeight()-1, config.NumBlocks, res, - ) - } - }) - } + simsx.RunWithSeed(b, config, New, setupStateFactory, 1, nil) } -<% } %> \ No newline at end of file diff --git a/ignite/templates/app/files/app/sim_test.go.plush b/ignite/templates/app/files/app/sim_test.go.plush index 2f5b4b0aee..76f6b486fe 100644 --- a/ignite/templates/app/files/app/sim_test.go.plush +++ b/ignite/templates/app/files/app/sim_test.go.plush @@ -1,38 +1,40 @@ -package app_test +//go:build sims + +package app import ( + "encoding/binary" "encoding/json" "flag" - "fmt" + "io" "math/rand" - "os" - "runtime/debug" "strings" + "sync" "testing" "time" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" + cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + corestore "cosmossdk.io/core/store" "cosmossdk.io/log" "cosmossdk.io/store" storetypes "cosmossdk.io/store/types" + authzkeeper "cosmossdk.io/x/authz/keeper" "cosmossdk.io/x/feegrant" - upgradetypes "cosmossdk.io/x/upgrade/types" - abci "github.com/cometbft/cometbft/abci/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" + slashingtypes "cosmossdk.io/x/slashing/types" + stakingtypes "cosmossdk.io/x/staking/types" + "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/server" + servertypes "github.com/cosmos/cosmos-sdk/server/types" + "github.com/cosmos/cosmos-sdk/simsx" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - simulationtypes "github.com/cosmos/cosmos-sdk/types/simulation" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/spf13/viper" - "github.com/stretchr/testify/require" - - "<%= ModulePath %>/app" ) const ( @@ -47,174 +49,194 @@ func init() { flag.BoolVar(&FlagEnableStreamingValue, "EnableStreaming", false, "Enable streaming service") } -// fauxMerkleModeOpt returns a BaseApp option to use a dbStoreAdapter instead of -// an IAVLStore for faster simulation speed. -func fauxMerkleModeOpt(bapp *baseapp.BaseApp) { - bapp.SetFauxMerkleMode() -} - // interBlockCacheOpt returns a BaseApp option function that sets the persistent // inter-block write-through cache. func interBlockCacheOpt() func(*baseapp.BaseApp) { return baseapp.SetInterBlockCache(store.NewCommitKVStoreCacheManager()) } -// BenchmarkSimulation run the chain simulation -// Running using starport command: -// `ignite chain simulate -v --numBlocks 200 --blockSize 50` -// Running as go benchmark test: -// `go test -benchmem -run=^$ -bench ^BenchmarkSimulation ./app -NumBlocks=200 -BlockSize 50 -Commit=true -Verbose=true -Enabled=true` -func BenchmarkSimulation(b *testing.B) { - simcli.FlagSeedValue = time.Now().Unix() - simcli.FlagVerboseValue = true - simcli.FlagCommitValue = true - simcli.FlagEnabledValue = true - - config := simcli.NewConfigFromFlags() - config.ChainID = SimAppChainID +func TestFullAppSimulation(t *testing.T) { + simsx.Run(t, New, setupStateFactory) +} - db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) - if skip { - b.Skip("skipping application simulation") +func setupStateFactory(app *App) simsx.SimStateFactory { + return simsx.SimStateFactory{ + Codec: app.AppCodec(), + AppStateFn: simtestutil.AppStateFn(app.AppCodec(), app.AuthKeeper.AddressCodec(), app.StakingKeeper.ValidatorAddressCodec(), app.SimulationManager().Modules, app.DefaultGenesis()), + BlockedAddr: BlockedAddresses(), + AccountSource: app.AuthKeeper, + BalanceSource: app.BankKeeper, } - require.NoError(b, err, "simulation setup failed") - - defer func() { - require.NoError(b, db.Close()) - require.NoError(b, os.RemoveAll(dir)) - }() - - appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = app.DefaultNodeHome - appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue - - bApp, err := app.New(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) - require.NoError(b, err) - require.Equal(b, app.Name, bApp.Name()) +} - // run randomized simulation - _, simParams, simErr := simulation.SimulateFromSeed( - b, - os.Stdout, - bApp.BaseApp, - simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), - simulationtypes.RandomAccounts, - simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), - app.BlockedAddresses(), - config, - bApp.AppCodec(), - ) +var ( + exportAllModules []string + exportWithValidatorSet []string +) - // export state and simParams before the simulation error is checked - err = simtestutil.CheckExportSimulation(bApp, config, simParams) - require.NoError(b, err) - require.NoError(b, simErr) +func TestAppImportExport(t *testing.T) { + simsx.Run(t, New, setupStateFactory, func(t testing.TB, ti simsx.TestInstance[*App], _ []simtypes.Account) { + app := ti.App + t.Log("exporting genesis...\n") + exported, err := app.ExportAppStateAndValidators(false, exportWithValidatorSet, exportAllModules) + require.NoError(t, err) + + t.Log("importing genesis...\n") + newTestInstance := simsx.NewSimulationAppInstance(t, ti.Cfg, New) + newApp := newTestInstance.App + var genesisState GenesisState + require.NoError(t, json.Unmarshal(exported.AppState, &genesisState)) + ctxB := newApp.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) + _, err = newApp.ModuleManager.InitGenesis(ctxB, genesisState) + if IsEmptyValidatorSetErr(err) { + t.Skip("Skipping simulation as all validators have been unbonded") + return + } + require.NoError(t, err) + err = newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) + require.NoError(t, err) + + t.Log("comparing stores...") + // skip certain prefixes + skipPrefixes := map[string][][]byte{ + stakingtypes.StoreKey: { + stakingtypes.UnbondingQueueKey, stakingtypes.RedelegationQueueKey, stakingtypes.ValidatorQueueKey, + stakingtypes.UnbondingIDKey, stakingtypes.UnbondingIndexKey, stakingtypes.UnbondingTypeKey, + }, + authzkeeper.StoreKey: {authzkeeper.GrantQueuePrefix}, + feegrant.StoreKey: {feegrant.FeeAllowanceQueueKeyPrefix}, + slashingtypes.StoreKey: {slashingtypes.ValidatorMissedBlockBitmapKeyPrefix}, + } + AssertEqualStores(t, app, newApp, app.SimulationManager().StoreDecoders, skipPrefixes) + }) +} - if config.Commit { - simtestutil.PrintStats(db) - } +// Scenario: +// +// Start a fresh node and run n blocks, export state +// set up a new node instance, Init chain from exported genesis +// run new instance for n blocks +func TestAppSimulationAfterImport(t *testing.T) { + simsx.Run(t, New, setupStateFactory, func(t testing.TB, ti simsx.TestInstance[*App], accs []simtypes.Account) { + app := ti.App + t.Log("exporting genesis...\n") + exported, err := app.ExportAppStateAndValidators(false, exportWithValidatorSet, exportAllModules) + require.NoError(t, err) + + importGenesisStateFactory := func(app *App) simsx.SimStateFactory { + return simsx.SimStateFactory{ + Codec: app.AppCodec(), + AppStateFn: func(r *rand.Rand, _ []simtypes.Account, config simtypes.Config) (json.RawMessage, []simtypes.Account, string, time.Time) { + t.Log("importing genesis...\n") + genesisTimestamp := time.Unix(config.GenesisTime, 0) + + _, err = app.InitChain(&abci.InitChainRequest{ + AppStateBytes: exported.AppState, + ChainId: SimAppChainID, + InitialHeight: exported.Height, + Time: genesisTimestamp, + }) + if IsEmptyValidatorSetErr(err) { + t.Skip("Skipping simulation as all validators have been unbonded") + return nil, nil, "", time.Time{} + } + require.NoError(t, err) + // use accounts from initial run + return exported.AppState, accs, config.ChainID, genesisTimestamp + }, + BlockedAddr: BlockedAddresses(), + AccountSource: app.AuthKeeper, + BalanceSource: app.BankKeeper, + } + } + ti.Cfg.InitialBlockHeight = int(exported.Height) + simsx.RunWithSeed(t, ti.Cfg, New, importGenesisStateFactory, ti.Cfg.Seed, ti.Cfg.FuzzSeed) + }) } -func TestAppImportExport(t *testing.T) { - config := simcli.NewConfigFromFlags() - config.ChainID = SimAppChainID +func IsEmptyValidatorSetErr(err error) bool { + return err != nil && strings.Contains(err.Error(), "validator set is empty after InitGenesis") +} - db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) - if skip { - t.Skip("skipping application import/export simulation") +func TestAppStateDeterminism(t *testing.T) { + const numTimesToRunPerSeed = 3 + var seeds []int64 + if s := simcli.NewConfigFromFlags().Seed; s != simcli.DefaultSeedValue { + // We will be overriding the random seed and just run a single simulation on the provided seed value + for j := 0; j < numTimesToRunPerSeed; j++ { // multiple rounds + seeds = append(seeds, s) + } + } else { + // setup with 3 random seeds + for i := 0; i < 3; i++ { + seed := rand.Int63() + for j := 0; j < numTimesToRunPerSeed; j++ { // multiple rounds + seeds = append(seeds, seed) + } + } } - require.NoError(t, err, "simulation setup failed") - - defer func() { - require.NoError(t, db.Close()) - require.NoError(t, os.RemoveAll(dir)) - }() - - appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = app.DefaultNodeHome - appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue - - bApp, err := app.New(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) - require.NoError(t, err) - require.Equal(t, app.Name, bApp.Name()) - - // Run randomized simulation - _, simParams, simErr := simulation.SimulateFromSeed( - t, - os.Stdout, - bApp.BaseApp, - simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), - simulationtypes.RandomAccounts, - simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), - app.BlockedAddresses(), - config, - bApp.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - err = simtestutil.CheckExportSimulation(bApp, config, simParams) - require.NoError(t, err) - require.NoError(t, simErr) - - if config.Commit { - simtestutil.PrintStats(db) + // overwrite default app config + interBlockCachingAppFactory := func(logger log.Logger, db corestore.KVStoreWithBatch, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp)) *App { + if FlagEnableStreamingValue { + m := map[string]any{ + "streaming.abci.keys": []string{"*"}, + "streaming.abci.plugin": "abci_v1", + "streaming.abci.stop-node-on-err": true, + } + others := appOpts + appOpts = simsx.AppOptionsFn(func(k string) any { + if v, ok := m[k]; ok { + return v + } + return others.Get(k) + }) + } + return New(logger, db, nil, true, appOpts, append(baseAppOptions, interBlockCacheOpt())...) } - - fmt.Printf("exporting genesis...\n") - - exported, err := bApp.ExportAppStateAndValidators(false, []string{}, []string{}) - require.NoError(t, err) - - fmt.Printf("importing genesis...\n") - - newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) - require.NoError(t, err, "simulation setup failed") - - defer func() { - require.NoError(t, newDB.Close()) - require.NoError(t, os.RemoveAll(newDir)) - }() - - newApp, err := app.New(log.NewNopLogger(), newDB, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) - require.NoError(t, err) - require.Equal(t, app.Name, newApp.Name()) - - var genesisState app.GenesisState - err = json.Unmarshal(exported.AppState, &genesisState) - require.NoError(t, err) - - ctxA := bApp.NewContextLegacy(true, cmtproto.Header{Height: bApp.LastBlockHeight()}) - ctxB := newApp.NewContextLegacy(true, cmtproto.Header{Height: bApp.LastBlockHeight()}) - _, err = newApp.ModuleManager.InitGenesis(ctxB, bApp.AppCodec(), genesisState) - - if err != nil { - if strings.Contains(err.Error(), "validator set is empty after InitGenesis") { - logger.Info("Skipping simulation as all validators have been unbonded") - logger.Info("err", err, "stacktrace", string(debug.Stack())) - return + var mx sync.Mutex + appHashResults := make(map[int64][][]byte) + appSimLogger := make(map[int64][]simulation.LogWriter) + captureAndCheckHash := func(t testing.TB, ti simsx.TestInstance[*App], _ []simtypes.Account) { + seed, appHash := ti.Cfg.Seed, ti.App.LastCommitID().Hash + mx.Lock() + otherHashes, execWriters := appHashResults[seed], appSimLogger[seed] + if len(otherHashes) < numTimesToRunPerSeed-1 { + appHashResults[seed], appSimLogger[seed] = append(otherHashes, appHash), append(execWriters, ti.ExecLogWriter) + } else { // cleanup + delete(appHashResults, seed) + delete(appSimLogger, seed) + } + mx.Unlock() + + var failNow bool + // and check that all app hashes per seed are equal for each iteration + for i := 0; i < len(otherHashes); i++ { + if !assert.Equal(t, otherHashes[i], appHash) { + execWriters[i].PrintLogs() + failNow = true + } + } + if failNow { + ti.ExecLogWriter.PrintLogs() + t.Fatalf("non-determinism in seed %d", seed) } } - require.NoError(t, err) - err = newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) - require.NoError(t, err) - fmt.Printf("comparing stores...\n") + // run simulations + simsx.RunWithSeeds(t, interBlockCachingAppFactory, setupStateFactory, seeds, []byte{}, captureAndCheckHash) +} - // skip certain prefixes - skipPrefixes := map[string][][]byte{ - upgradetypes.StoreKey: { - []byte{upgradetypes.VersionMapByte}, - }, - stakingtypes.StoreKey: { - stakingtypes.UnbondingQueueKey, stakingtypes.RedelegationQueueKey, stakingtypes.ValidatorQueueKey, - stakingtypes.HistoricalInfoKey, stakingtypes.UnbondingIDKey, stakingtypes.UnbondingIndexKey, - stakingtypes.UnbondingTypeKey, stakingtypes.ValidatorUpdatesKey, - }, - authzkeeper.StoreKey: {authzkeeper.GrantQueuePrefix}, - feegrant.StoreKey: {feegrant.FeeAllowanceQueueKeyPrefix}, - slashingtypes.StoreKey: {slashingtypes.ValidatorMissedBlockBitmapKeyPrefix}, - } +type ComparableStoreApp interface { + LastBlockHeight() int64 + NewContextLegacy(isCheckTx bool, header cmtproto.Header) sdk.Context + GetKey(storeKey string) *storetypes.KVStoreKey + GetStoreKeys() []storetypes.StoreKey +} - storeKeys := bApp.GetStoreKeys() +func AssertEqualStores(t testing.TB, app, newApp ComparableStoreApp, storeDecoders simtypes.StoreDecoderRegistry, skipPrefixes map[string][][]byte) { + ctxA := app.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) + ctxB := newApp.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) + + storeKeys := app.GetStoreKeys() require.NotEmpty(t, storeKeys) for _, appKeyA := range storeKeys { @@ -230,201 +252,30 @@ func TestAppImportExport(t *testing.T) { storeB := ctxB.KVStore(appKeyB) failedKVAs, failedKVBs := simtestutil.DiffKVStores(storeA, storeB, skipPrefixes[keyName]) - require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare %s", keyName) - - fmt.Printf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), appKeyA, appKeyB) - - require.Equal(t, 0, len(failedKVAs), simtestutil.GetSimulationLog(keyName, bApp.SimulationManager().StoreDecoders, failedKVAs, failedKVBs)) - } -} - -func TestAppSimulationAfterImport(t *testing.T) { - config := simcli.NewConfigFromFlags() - config.ChainID = SimAppChainID - - db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) - if skip { - t.Skip("skipping application simulation after import") - } - require.NoError(t, err, "simulation setup failed") - - defer func() { - require.NoError(t, db.Close()) - require.NoError(t, os.RemoveAll(dir)) - }() - - appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = app.DefaultNodeHome - appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue - - bApp, err := app.New(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) - require.NoError(t, err) - require.Equal(t, app.Name, bApp.Name()) - - // Run randomized simulation - stopEarly, simParams, simErr := simulation.SimulateFromSeed( - t, - os.Stdout, - bApp.BaseApp, - simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), - simulationtypes.RandomAccounts, - simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), - app.BlockedAddresses(), - config, - bApp.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - err = simtestutil.CheckExportSimulation(bApp, config, simParams) - require.NoError(t, err) - require.NoError(t, simErr) - - if config.Commit { - simtestutil.PrintStats(db) - } - - if stopEarly { - fmt.Println("can't export or import a zero-validator genesis, exiting test...") - return - } - - fmt.Printf("exporting genesis...\n") - - exported, err := bApp.ExportAppStateAndValidators(true, []string{}, []string{}) - require.NoError(t, err) - - fmt.Printf("importing genesis...\n") - - newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) - require.NoError(t, err, "simulation setup failed") - - defer func() { - require.NoError(t, newDB.Close()) - require.NoError(t, os.RemoveAll(newDir)) - }() - - newApp, err := app.New(log.NewNopLogger(), newDB, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) - require.NoError(t, err) - require.Equal(t, app.Name, newApp.Name()) - - _, err = newApp.InitChain(&abci.RequestInitChain{ - AppStateBytes: exported.AppState, - ChainId: SimAppChainID, - }) - require.NoError(t, err) - - _, _, err = simulation.SimulateFromSeed( - t, - os.Stdout, - newApp.BaseApp, - simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()), - simulationtypes.RandomAccounts, - simtestutil.SimulationOperations(newApp, newApp.AppCodec(), config), - app.BlockedAddresses(), - config, - bApp.AppCodec(), - ) - require.NoError(t, err) -} - -func TestAppStateDeterminism(t *testing.T) { - if !simcli.FlagEnabledValue { - t.Skip("skipping application simulation") - } - - config := simcli.NewConfigFromFlags() - config.InitialBlockHeight = 1 - config.ExportParamsPath = "" - config.OnOperation = true - config.AllInvariants = true - config.ChainID = SimAppChainID + require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare %s, key stores %s and %s", keyName, appKeyA, appKeyB) - numSeeds := 3 - numTimesToRunPerSeed := 3 // This used to be set to 5, but we've temporarily reduced it to 3 for the sake of faster CI. - appHashList := make([]json.RawMessage, numTimesToRunPerSeed) - - // We will be overriding the random seed and just run a single simulation on the provided seed value - if config.Seed != simcli.DefaultSeedValue { - numSeeds = 1 - } - - appOptions := viper.New() - if FlagEnableStreamingValue { - m := make(map[string]interface{}) - m["streaming.abci.keys"] = []string{"*"} - m["streaming.abci.plugin"] = "abci_v1" - m["streaming.abci.stop-node-on-err"] = true - for key, value := range m { - appOptions.SetDefault(key, value) + t.Logf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), appKeyA, appKeyB) + if !assert.Equal(t, 0, len(failedKVAs), simtestutil.GetSimulationLog(keyName, storeDecoders, failedKVAs, failedKVBs)) { + for _, v := range failedKVAs { + t.Logf("store mismatch: %q\n", v) + } + t.FailNow() } } - appOptions.SetDefault(flags.FlagHome, app.DefaultNodeHome) - appOptions.SetDefault(server.FlagInvCheckPeriod, simcli.FlagPeriodValue) - if simcli.FlagVerboseValue { - appOptions.SetDefault(flags.FlagLogLevel, "debug") - } - - for i := 0; i < numSeeds; i++ { - if config.Seed == simcli.DefaultSeedValue { - config.Seed = rand.Int63() - } - fmt.Println("config.Seed: ", config.Seed) - - for j := 0; j < numTimesToRunPerSeed; j++ { - var logger log.Logger - if simcli.FlagVerboseValue { - logger = log.NewTestLogger(t) - } else { - logger = log.NewNopLogger() - } - - db := dbm.NewMemDB() - bApp, err := app.New( - logger, - db, - nil, - true, - appOptions, - interBlockCacheOpt(), - baseapp.SetChainID(SimAppChainID), - ) - require.NoError(t, err) - - fmt.Printf( - "running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", - config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, - ) - - _, _, err = simulation.SimulateFromSeed( - t, - os.Stdout, - bApp.BaseApp, - simtestutil.AppStateFn( - bApp.AppCodec(), - bApp.SimulationManager(), - bApp.DefaultGenesis(), - ), - simulationtypes.RandomAccounts, - simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), - app.BlockedAddresses(), - config, - bApp.AppCodec(), - ) - require.NoError(t, err) - - if config.Commit { - simtestutil.PrintStats(db) - } - - appHash := bApp.LastCommitID().Hash - appHashList[j] = appHash +} - if j != 0 { - require.Equal( - t, string(appHashList[0]), string(appHashList[j]), - "non-determinism in seed %d: %d/%d, attempt: %d/%d\n", config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, - ) - } +func FuzzFullAppSimulation(f *testing.F) { + f.Fuzz(func(t *testing.T, rawSeed []byte) { + if len(rawSeed) < 8 { + t.Skip() + return } - } + simsx.RunWithSeeds( + t, + New, + setupStateFactory, + []int64{int64(binary.BigEndian.Uint64(rawSeed))}, + rawSeed[8:], + ) + }) } diff --git a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/commands.go.plush b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/commands.go.plush index 46df14a4b9..05aaaabc8f 100644 --- a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/commands.go.plush +++ b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/commands.go.plush @@ -4,9 +4,13 @@ import ( "errors" "io" + "github.com/spf13/cobra" + "github.com/spf13/viper" + + corestore "cosmossdk.io/core/store" "cosmossdk.io/log" confixcmd "cosmossdk.io/tools/confix/cmd" - dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" @@ -14,54 +18,45 @@ import ( "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/client/snapshot" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/types/module" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" - "github.com/cosmos/cosmos-sdk/x/crisis" + "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - "github.com/spf13/cobra" - "github.com/spf13/viper" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "<%= ModulePath %>/app" ) func initRootCmd( rootCmd *cobra.Command, - txConfig client.TxConfig, - basicManager module.BasicManager, + moduleManager *module.Manager, ) { rootCmd.AddCommand( - genutilcli.InitCmd(basicManager, app.DefaultNodeHome), - NewInPlaceTestnetCmd(addModuleInitFlags), + genutilcli.InitCmd(moduleManager), + NewInPlaceTestnetCmd(), debug.Cmd(), confixcmd.ConfigCommand(), - pruning.Cmd(newApp, app.DefaultNodeHome), + pruning.Cmd(newApp), snapshot.Cmd(newApp), ) - server.AddCommands(rootCmd, app.DefaultNodeHome, newApp, appExport, addModuleInitFlags) + server.AddCommands(rootCmd, newApp, server.StartCmdOptions[servertypes.Application]{}) // add keybase, auxiliary RPC, query, genesis, and tx child commands rootCmd.AddCommand( server.StatusCommand(), - genesisCommand(txConfig, basicManager), + genesisCommand(moduleManager, appExport), queryCommand(), txCommand(), keys.Commands(), ) } -func addModuleInitFlags(startCmd *cobra.Command) { - crisis.AddModuleInitFlags(startCmd) -} - // genesisCommand builds genesis-related `<%= BinaryNamePrefix %>d genesis` command. Users may provide application specific commands as a parameter -func genesisCommand(txConfig client.TxConfig, basicManager module.BasicManager, cmds ...*cobra.Command) *cobra.Command { - cmd := genutilcli.Commands(txConfig, basicManager, app.DefaultNodeHome) - +func genesisCommand(moduleManager *module.Manager, appExport servertypes.AppExporter, cmds ...*cobra.Command) *cobra.Command { + cmd := genutilcli.Commands(moduleManager.Modules[genutiltypes.ModuleName].(genutil.AppModule), moduleManager, appExport) for _, subCmd := range cmds { cmd.AddCommand(subCmd) } @@ -79,15 +74,13 @@ func queryCommand() *cobra.Command { } cmd.AddCommand( - rpc.QueryEventForTxCmd(), - rpc.ValidatorCommand(), + rpc.WaitTxCmd(), server.QueryBlockCmd(), authcmd.QueryTxsByEventsCmd(), server.QueryBlocksCmd(), authcmd.QueryTxCmd(), server.QueryBlockResultsCmd(), ) - cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd } @@ -113,7 +106,6 @@ func txCommand() *cobra.Command { authcmd.GetDecodeCommand(), authcmd.GetSimulateCmd(), ) - cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd } @@ -121,27 +113,22 @@ func txCommand() *cobra.Command { // newApp creates the application func newApp( logger log.Logger, - db dbm.DB, + db corestore.KVStoreWithBatch, traceStore io.Writer, appOpts servertypes.AppOptions, ) servertypes.Application { baseappOptions := server.DefaultBaseappOptions(appOpts) - - app, err := app.New( + return app.New( logger, db, traceStore, true, appOpts, baseappOptions..., ) - if err != nil { - panic(err) - } - return app } // appExport creates a new app (optionally at a given height) and exports state. func appExport( logger log.Logger, - db dbm.DB, + db corestore.KVStoreWithBatch, traceStore io.Writer, height int64, forZeroHeight bool, @@ -149,18 +136,6 @@ func appExport( appOpts servertypes.AppOptions, modulesToExport []string, ) (servertypes.ExportedApp, error) { - var ( - bApp *app.App - err error - ) - - // this check is necessary as we use the flag in x/upgrade. - // we can exit more gracefully by checking the flag here. - homePath, ok := appOpts.Get(flags.FlagHome).(string) - if !ok || homePath == "" { - return servertypes.ExportedApp{}, errors.New("application home not set") - } - viperAppOpts, ok := appOpts.(*viper.Viper) if !ok { return servertypes.ExportedApp{}, errors.New("appOpts is not viper.Viper") @@ -170,20 +145,14 @@ func appExport( viperAppOpts.Set(server.FlagInvCheckPeriod, 1) appOpts = viperAppOpts + var bApp *app.App if height != -1 { - bApp, err = app.New(logger, db, traceStore, false, appOpts) - if err != nil { - return servertypes.ExportedApp{}, err - } - + bApp = app.New(logger, db, traceStore, false, appOpts) if err := bApp.LoadHeight(height); err != nil { return servertypes.ExportedApp{}, err } } else { - bApp, err = app.New(logger, db, traceStore, true, appOpts) - if err != nil { - return servertypes.ExportedApp{}, err - } + bApp = app.New(logger, db, traceStore, true, appOpts) } return bApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) diff --git a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/config.go.plush b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/config.go.plush index a14ebc57c3..72f7b9f347 100644 --- a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/config.go.plush +++ b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/config.go.plush @@ -41,7 +41,6 @@ func initAppConfig() (string, interface{}) { // // In tests, we set the min gas prices to 0. // srvCfg.MinGasPrices = "0stake" - // srvCfg.BaseConfig.IAVLDisableFastNode = true // disable fastnode by default customAppConfig := CustomAppConfig{ Config: *srvCfg, diff --git a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/root.go.plush b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/root.go.plush index b70ceeb846..d61e8b0d63 100644 --- a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/root.go.plush +++ b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/root.go.plush @@ -2,46 +2,46 @@ package cmd import ( "os" - "strings" + "github.com/spf13/cobra" + + authv1 "cosmossdk.io/api/cosmos/auth/module/v1" + stakingv1 "cosmossdk.io/api/cosmos/staking/module/v1" "cosmossdk.io/client/v2/autocli" + "cosmossdk.io/core/address" + "cosmossdk.io/core/registry" "cosmossdk.io/depinject" "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" - "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/auth/tx" - authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config" - "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/spf13/cobra" - "github.com/spf13/pflag" - "<%= ModulePath %>/app" ) // NewRootCmd creates a new root command for <%= BinaryNamePrefix %>d. It is called once in the main function. func NewRootCmd() *cobra.Command { var ( - autoCliOpts autocli.AppOptions - moduleBasicManager module.BasicManager - clientCtx client.Context + autoCliOpts autocli.AppOptions + moduleManager *module.Manager + clientCtx client.Context ) if err := depinject.Inject( depinject.Configs(app.AppConfig(), - depinject.Supply( - log.NewNopLogger(), - ), + depinject.Supply(log.NewNopLogger()), depinject.Provide( ProvideClientContext, ), ), &autoCliOpts, - &moduleBasicManager, + &moduleManager, &clientCtx, ); err != nil { panic(err) @@ -49,20 +49,20 @@ func NewRootCmd() *cobra.Command { rootCmd := &cobra.Command{ Use: app.Name + "d", - Short: "Start <%= AppName %> node", + Short: "<%= AppName %> node", SilenceErrors: true, PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { // set the default command outputs cmd.SetOut(cmd.OutOrStdout()) cmd.SetErr(cmd.ErrOrStderr()) - clientCtx = clientCtx.WithCmdContext(cmd.Context()) + clientCtx = clientCtx.WithCmdContext(cmd.Context()).WithViper("") clientCtx, err := client.ReadPersistentCommandFlags(clientCtx, cmd.Flags()) if err != nil { return err } - clientCtx, err = config.ReadFromClientConfig(clientCtx) + clientCtx, err = config.CreateClientConfig(clientCtx, "", nil) if err != nil { return err } @@ -78,22 +78,7 @@ func NewRootCmd() *cobra.Command { }, } -<%= if (!IsChainMinimal) { %> - // Since the IBC modules don't support dependency injection, we need to - // manually register the modules on the client side. - // This needs to be removed after IBC supports App Wiring. - ibcModules := app.RegisterIBC(clientCtx.InterfaceRegistry) - for name, mod := range ibcModules { - moduleBasicManager[name] = module.CoreAppModuleBasicAdaptor(name, mod) - autoCliOpts.Modules[name] = mod - } -<% } %> - initRootCmd(rootCmd, clientCtx.TxConfig, moduleBasicManager) - - overwriteFlagDefaults(rootCmd, map[string]string{ - flags.FlagChainID: strings.ReplaceAll(app.Name, "-", ""), - flags.FlagKeyringBackend: "test", - }) + initRootCmd(rootCmd, moduleManager) if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { panic(err) @@ -102,39 +87,43 @@ func NewRootCmd() *cobra.Command { return rootCmd } -func overwriteFlagDefaults(c *cobra.Command, defaults map[string]string) { - set := func(s *pflag.FlagSet, key, val string) { - if f := s.Lookup(key); f != nil { - f.DefValue = val - _ = f.Value.Set(val) - } - } - for key, val := range defaults { - set(c.Flags(), key, val) - set(c.PersistentFlags(), key, val) - } - for _, c := range c.Commands() { - overwriteFlagDefaults(c, defaults) - } -} - func ProvideClientContext( appCodec codec.Codec, interfaceRegistry codectypes.InterfaceRegistry, txConfigOpts tx.ConfigOptions, - legacyAmino *codec.LegacyAmino, + legacyAmino registry.AminoRegistrar, + addressCodec address.Codec, + validatorAddressCodec address.ValidatorAddressCodec, + consensusAddressCodec address.ConsensusAddressCodec, + authConfig *authv1.Module, + stakingConfig *stakingv1.Module, ) client.Context { + var err error + + amino, ok := legacyAmino.(*codec.LegacyAmino) + if !ok { + panic("ProvideClientContext requires a *codec.LegacyAmino instance") + } + clientCtx := client.Context{}. WithCodec(appCodec). WithInterfaceRegistry(interfaceRegistry). - WithLegacyAmino(legacyAmino). + WithLegacyAmino(amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). + WithAddressCodec(addressCodec). + WithValidatorAddressCodec(validatorAddressCodec). + WithConsensusAddressCodec(consensusAddressCodec). WithHomeDir(app.DefaultNodeHome). - WithViper(app.Name) // env variable prefix + WithViper(app.Name). // env variable prefix + WithAddressPrefix(authConfig.Bech32Prefix). + WithValidatorPrefix(stakingConfig.Bech32PrefixValidator) - // Read the config again to overwrite the default values with the values from the config file - clientCtx, _ = config.ReadFromClientConfig(clientCtx) + // Read the config to overwrite the default values with the values from the config file + clientCtx, err = config.CreateClientConfig(clientCtx, "", nil) + if err != nil { + panic(err) + } // textual is enabled by default, we need to re-create the tx config grpc instead of bank keeper. txConfigOpts.TextualCoinMetadataQueryFn = authtxconfig.NewGRPCCoinMetadataQueryFn(clientCtx) diff --git a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush index 890ce499be..4acf1551ca 100644 --- a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush +++ b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush @@ -1,30 +1,33 @@ package cmd import ( + "os" "fmt" "io" "strings" + "github.com/spf13/cast" + "github.com/spf13/cobra" + + "cosmossdk.io/collections" + corestore "cosmossdk.io/core/store" "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + distrtypes "cosmossdk.io/x/distribution/types" + minttypes "cosmossdk.io/x/mint/types" + slashingtypes "cosmossdk.io/x/slashing/types" + stakingtypes "cosmossdk.io/x/staking/types" + "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/libs/bytes" - tmos "github.com/cometbft/cometbft/libs/os" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client/flags" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/spf13/cast" - "github.com/spf13/cobra" + cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "<%= ModulePath %>/app" ) @@ -46,9 +49,8 @@ type valArgs struct { homeDir string } -func NewInPlaceTestnetCmd(addStartFlags servertypes.ModuleInitFlags) *cobra.Command { +func NewInPlaceTestnetCmd() *cobra.Command { cmd := server.InPlaceTestnetCreator(newTestnetApp) - addStartFlags(cmd) cmd.Short = "Updates chain's application and consensus state with provided validator info and starts the node" cmd.Long = `The test command modifies both application and consensus stores within a local mainnet node and starts the node, with the aim of facilitating testing procedures. This command replaces existing validator data with updated information, @@ -63,7 +65,7 @@ it enables developers to configure their local environments to reflect mainnet c // newTestnetApp starts by running the normal newApp method. From there, the app interface returned is modified in order // for a testnet to be created from the provided app. -func newTestnetApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { +func newTestnetApp(logger log.Logger, db corestore.KVStoreWithBatch, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { // Create an app and type cast to an App newApp := newApp(logger, db, traceStore, appOpts) testApp, ok := newApp.(*app.App) @@ -83,12 +85,13 @@ func newTestnetApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts s func initAppForTestnet(app *app.App, args valArgs) *app.App { // Required Changes: // - ctx := app.BaseApp.NewUncachedContext(true, tmproto.Header{}) + ctx := app.App.NewUncachedContext(true, cmtproto.Header{}) pubkey := &ed25519.PubKey{Key: args.newValPubKey.Bytes()} pubkeyAny, err := codectypes.NewAnyWithValue(pubkey) if err != nil { - tmos.Exit(err.Error()) + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) } // STAKING @@ -117,7 +120,8 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { validator, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(newVal.GetOperator()) if err != nil { - tmos.Exit(err.Error()) + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) } // Remove all validators from power store @@ -125,7 +129,8 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { stakingStore := ctx.KVStore(stakingKey) iterator, err := app.StakingKeeper.ValidatorsPowerStoreIterator(ctx) if err != nil { - tmos.Exit(err.Error()) + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) } for ; iterator.Valid(); iterator.Next() { stakingStore.Delete(iterator.Key()) @@ -133,14 +138,10 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { iterator.Close() // Remove all valdiators from last validators store - iterator, err = app.StakingKeeper.LastValidatorsIterator(ctx) - if err != nil { - tmos.Exit(err.Error()) + if err := app.StakingKeeper.LastValidatorPower.Clear(ctx, nil); err != nil { + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) } - for ; iterator.Valid(); iterator.Next() { - stakingStore.Delete(iterator.Key()) - } - iterator.Close() // Remove all validators from validators store iterator = stakingStore.Iterator(stakingtypes.ValidatorsKey, storetypes.PrefixEndBytes(stakingtypes.ValidatorsKey)) @@ -160,22 +161,24 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { app.StakingKeeper.SetValidator(ctx, newVal) err = app.StakingKeeper.SetValidatorByConsAddr(ctx, newVal) if err != nil { - tmos.Exit(err.Error()) + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) } app.StakingKeeper.SetValidatorByPowerIndex(ctx, newVal) app.StakingKeeper.SetLastValidatorPower(ctx, validator, 0) if err := app.StakingKeeper.Hooks().AfterValidatorCreated(ctx, validator); err != nil { - tmos.Exit(err.Error()) + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) } // DISTRIBUTION // // Initialize records for this validator across all distribution stores - app.DistrKeeper.SetValidatorHistoricalRewards(ctx, validator, 0, distrtypes.NewValidatorHistoricalRewards(sdk.DecCoins{}, 1)) - app.DistrKeeper.SetValidatorCurrentRewards(ctx, validator, distrtypes.NewValidatorCurrentRewards(sdk.DecCoins{}, 1)) - app.DistrKeeper.SetValidatorAccumulatedCommission(ctx, validator, distrtypes.InitialValidatorAccumulatedCommission()) - app.DistrKeeper.SetValidatorOutstandingRewards(ctx, validator, distrtypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) + app.DistrKeeper.ValidatorHistoricalRewards.Set(ctx, collections.Join(sdk.ValAddress(validator), uint64(0)), distrtypes.NewValidatorHistoricalRewards(sdk.DecCoins{}, 1)) + app.DistrKeeper.ValidatorCurrentRewards.Set(ctx, validator, distrtypes.NewValidatorCurrentRewards(sdk.DecCoins{}, 1)) + app.DistrKeeper.ValidatorsAccumulatedCommission.Set(ctx, validator, distrtypes.InitialValidatorAccumulatedCommission()) + app.DistrKeeper.ValidatorOutstandingRewards.Set(ctx, validator, distrtypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) <%= if (!IsChainMinimal) { %> // SLASHING @@ -185,17 +188,18 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { newConsAddr := sdk.ConsAddress(args.newValAddr.Bytes()) newValidatorSigningInfo := slashingtypes.ValidatorSigningInfo{ Address: newConsAddr.String(), - StartHeight: app.LastBlockHeight() - 1, + StartHeight: app.App.LastBlockHeight() - 1, Tombstoned: false, } - app.SlashingKeeper.SetValidatorSigningInfo(ctx, newConsAddr, newValidatorSigningInfo) + app.SlashingKeeper.ValidatorSigningInfo.Set(ctx, newConsAddr, newValidatorSigningInfo) <% } %> // BANK // bondDenom, err := app.StakingKeeper.BondDenom(ctx) if err != nil { - tmos.Exit(err.Error()) + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) } defaultCoins := sdk.NewCoins(sdk.NewInt64Coin(bondDenom, 1000000000)) @@ -204,11 +208,13 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { for _, account := range args.accountsToFund { err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, defaultCoins) if err != nil { - tmos.Exit(err.Error()) + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) } err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, account, defaultCoins) if err != nil { - tmos.Exit(err.Error()) + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) } } diff --git a/ignite/templates/app/files/go.mod.plush b/ignite/templates/app/files/go.mod.plush index f5df11a6ef..c78b43c718 100644 --- a/ignite/templates/app/files/go.mod.plush +++ b/ignite/templates/app/files/go.mod.plush @@ -1,50 +1,90 @@ module <%= ModulePath %> -go 1.23 +go 1.23.1 + +replace ( + cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241011204412-65ed5eb8007f + cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.4 + cosmossdk.io/core/testing => cosmossdk.io/core/testing v0.0.0-20241011204412-65ed5eb8007f + cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241011204412-65ed5eb8007f + cosmossdk.io/tools/confix => cosmossdk.io/tools/confix v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241011125406-ba5966f7dda3 + cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241011125406-ba5966f7dda3 + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2 +) replace ( // fix upstream GHSA-h395-qcrw-5vmq vulnerability. - github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 + github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) require ( - cosmossdk.io/api v0.7.5 - cosmossdk.io/client/v2 v2.0.0-beta.4 - cosmossdk.io/collections v0.4.0 - cosmossdk.io/core v0.11.1 + cosmossdk.io/api v0.8.0 + cosmossdk.io/client/v2 v2.0.0 + cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab + cosmossdk.io/core v1.0.0 cosmossdk.io/depinject v1.0.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.4.1 cosmossdk.io/math v1.3.0 - cosmossdk.io/store v1.1.1 + cosmossdk.io/store v1.1.1-0.20240909133312-50288938d1b6 cosmossdk.io/tools/confix v0.1.2 + cosmossdk.io/x/accounts v0.0.0-20240913065641-0064ccbce64e + cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/circuit v0.1.1 + cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/distribution v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 cosmossdk.io/x/evidence v0.1.1 cosmossdk.io/x/feegrant v0.1.1 + cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a + cosmossdk.io/x/group v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000 cosmossdk.io/x/nft v0.1.0 + cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 + cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 cosmossdk.io/x/upgrade v0.1.4 github.com/bufbuild/buf v1.32.1 - github.com/cometbft/cometbft v0.38.12 - github.com/cosmos/cosmos-db v1.0.2 + github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f + github.com/cometbft/cometbft/api v1.0.0-rc.1 + github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22 github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.50.9 + github.com/cosmos/cosmos-sdk v0.52.0 github.com/cosmos/gogoproto v1.7.0 - github.com/cosmos/ibc-go/modules/capability v1.0.1 - github.com/cosmos/ibc-go/v8 v8.5.1-0.20240911080511-34a0d0147847 github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 - github.com/spf13/cast v1.6.0 + github.com/spf13/cast v1.7.0 github.com/spf13/cobra v1.8.1 - github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.9.0 - golang.org/x/tools v0.22.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d - google.golang.org/grpc v1.64.1 + golang.org/x/tools v0.25.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 + google.golang.org/grpc v1.67.1 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 - google.golang.org/protobuf v1.34.2 + google.golang.org/protobuf v1.35.1 ) \ No newline at end of file diff --git a/ignite/templates/ibc/packet.go b/ignite/templates/ibc/packet.go index 85a9eb37eb..cdfc066137 100644 --- a/ignite/templates/ibc/packet.go +++ b/ignite/templates/ibc/packet.go @@ -391,7 +391,7 @@ func codecModify(replacer placeholder.Replacer, opts *PacketOptions) genny.RunFn content := replacer.ReplaceOnce(f.String(), module.Placeholder, replacement) // Register the module packet interface - templateInterface := `registry.RegisterImplementations((*sdk.Msg)(nil), + templateInterface := `registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgSend%[2]v{}, ) %[1]v` diff --git a/ignite/templates/message/files/simapp/x/{{moduleName}}/simulation/{{msgName}}.go.plush b/ignite/templates/message/files/simapp/x/{{moduleName}}/simulation/{{msgName}}.go.plush index 90329dd141..0618022dd8 100644 --- a/ignite/templates/message/files/simapp/x/{{moduleName}}/simulation/{{msgName}}.go.plush +++ b/ignite/templates/message/files/simapp/x/{{moduleName}}/simulation/{{msgName}}.go.plush @@ -5,7 +5,6 @@ import ( "<%= ModulePath %>/x/<%= ModuleName %>/keeper" "<%= ModulePath %>/x/<%= ModuleName %>/types" - "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) @@ -16,7 +15,7 @@ func SimulateMsg<%= MsgName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.Msg<%= MsgName.UpperCamel %>{ diff --git a/ignite/templates/message/message.go b/ignite/templates/message/message.go index fae97f52a9..9fa658adb8 100644 --- a/ignite/templates/message/message.go +++ b/ignite/templates/message/message.go @@ -179,7 +179,7 @@ func typesCodecModify(replacer placeholder.Replacer, opts *Options) genny.RunFn replacementImport := `sdk "github.com/cosmos/cosmos-sdk/types"` content := replacer.ReplaceOnce(f.String(), Placeholder, replacementImport) - templateRegisterImplementations := `registry.RegisterImplementations((*sdk.Msg)(nil), + templateRegisterImplementations := `registrar.RegisterImplementations((*sdk.Msg)(nil), &Msg%[2]v{}, ) %[1]v` diff --git a/ignite/templates/module/create/files/base/testutil/keeper/{{moduleName}}.go.plush b/ignite/templates/module/create/files/base/testutil/keeper/{{moduleName}}.go.plush index cceee94878..e3eec7cca0 100644 --- a/ignite/templates/module/create/files/base/testutil/keeper/{{moduleName}}.go.plush +++ b/ignite/templates/module/create/files/base/testutil/keeper/{{moduleName}}.go.plush @@ -8,7 +8,6 @@ import ( "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" @@ -16,7 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "cosmossdk.io/x/gov/types" "github.com/stretchr/testify/require" "<%= modulePath %>/x/<%= moduleName %>/keeper" @@ -45,7 +44,7 @@ func <%= title(moduleName) %>Keeper(t testing.TB) (keeper.Keeper, sdk.Context, a nil,<% } %> ) - ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) + ctx := sdk.NewContext(stateStore, false, log.NewNopLogger()) // Initialize params if err := k.Params.Set(ctx, types.DefaultParams()); err != nil { diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/genesis.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/genesis.go.plush index 0017540910..1090ba3cbb 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/genesis.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/genesis.go.plush @@ -1,20 +1,20 @@ package <%= moduleName %> import ( - sdk "github.com/cosmos/cosmos-sdk/types" + "context" "<%= modulePath %>/x/<%= moduleName %>/keeper" "<%= modulePath %>/x/<%= moduleName %>/types" ) // InitGenesis initializes the module's state from a provided genesis state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) error { +func InitGenesis(ctx context.Context, k keeper.Keeper, genState types.GenesisState) error { // this line is used by starport scaffolding # genesis/module/init return k.Params.Set(ctx, genState.Params) } // ExportGenesis returns the module's exported genesis. -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) (*types.GenesisState, error) { +func ExportGenesis(ctx context.Context, k keeper.Keeper) (*types.GenesisState, error) { var err error genesis := types.DefaultGenesis() diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush index ee5f808ebe..4097059b54 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush @@ -8,17 +8,17 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" + "cosmossdk.io/core/registry" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "cosmossdk.io/x/gov/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" + "google.golang.org/grpc" <%= if (isIBC) { %>porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" @@ -32,12 +32,10 @@ import ( ) var ( - _ module.AppModuleBasic = (*AppModule)(nil) _ module.AppModuleSimulation = (*AppModule)(nil) - _ module.HasGenesis = (*AppModule)(nil) - _ module.HasInvariants = (*AppModule)(nil) - _ module.HasConsensusVersion = (*AppModule)(nil) + _ appmodule.HasGenesis = (*AppModule)(nil) + _ appmodule.HasConsensusVersion = (*AppModule)(nil) _ appmodule.AppModule = (*AppModule)(nil) _ appmodule.HasBeginBlocker = (*AppModule)(nil) _ appmodule.HasEndBlocker = (*AppModule)(nil) @@ -51,10 +49,10 @@ var ( // AppModuleBasic implements the AppModuleBasic interface that defines the // independent methods a Cosmos SDK module needs to implement. type AppModuleBasic struct { - cdc codec.BinaryCodec + cdc codec.Codec } -func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { +func NewAppModuleBasic(cdc codec.Codec) AppModuleBasic { return AppModuleBasic{cdc: cdc} } @@ -63,25 +61,21 @@ func (AppModuleBasic) Name() string { return types.ModuleName } -// RegisterLegacyAminoCodec registers the amino codec for the module, which is used -// to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore. -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} - // RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message. -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { - types.RegisterInterfaces(reg) +func (a AppModuleBasic) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + types.RegisterInterfaces(registrar) } // DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. // The default GenesisState need to be defined by the module developer and is primarily used for testing. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesis()) +func (am AppModuleBasic) DefaultGenesis() json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesis()) } // ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModuleBasic) ValidateGenesis(bz json.RawMessage) error { var genState types.GenesisState - if err := cdc.UnmarshalJSON(bz, &genState); err != nil { + if err := am.cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } return genState.Validate() @@ -130,32 +124,32 @@ func NewAppModule( } // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries -func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) - types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServerImpl(am.keeper)) -} +func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { + types.RegisterMsgServer(registrar, keeper.NewMsgServerImpl(am.keeper)) + types.RegisterQueryServer(registrar, keeper.NewQueryServerImpl(am.keeper)) -// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} + return nil +} // InitGenesis performs the module's genesis initialization. It returns no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { +func (am AppModule) InitGenesis(ctx context.Context, gs json.RawMessage) error { var genState types.GenesisState // Initialize global index to index in genesis state - cdc.MustUnmarshalJSON(gs, &genState) - - if err := InitGenesis(ctx, am.keeper, genState); err != nil { - panic(err) + if err := am.cdc.UnmarshalJSON(gs, &genState); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } + + return InitGenesis(ctx, am.keeper, genState) } // ExportGenesis returns the module's exported genesis state as raw JSON bytes. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { +func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { genState, err := ExportGenesis(ctx, am.keeper) if err != nil { - panic(err) + return nil, err } - return cdc.MustMarshalJSON(genState) + + return am.cdc.MarshalJSON(genState) } // ConsensusVersion is a sequence number for state-breaking change of the module. diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/simulation.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/simulation.go.plush index a890435c27..7cc773fe9d 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/simulation.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/simulation.go.plush @@ -3,6 +3,7 @@ package <%= moduleName %> import ( "math/rand" + "cosmossdk.io/core/address" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/codec.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/codec.go.plush index d66e15da0e..301948bdb7 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/codec.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/codec.go.plush @@ -1,6 +1,8 @@ package types import ( + "cosmossdk.io/core/registry" + <%= if (isIBC) { %>"github.com/cosmos/cosmos-sdk/codec"<% } %> cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -9,13 +11,13 @@ import ( // this line is used by starport scaffolding # 1 ) -func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { +func RegisterInterfaces(registrar registry.InterfaceRegistrar) { // this line is used by starport scaffolding # 3 - registry.RegisterImplementations((*sdk.Msg)(nil), + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgUpdateParams{}, ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) } <%= if (isIBC) { %> diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/expected_keepers.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/expected_keepers.go.plush index 663cd8b82f..63ae1fbaed 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/expected_keepers.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/expected_keepers.go.plush @@ -4,9 +4,9 @@ import ( "context" <%= if (dependencies.Contains("Staking")) { %>"cosmossdk.io/core/address" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"<% } %> + stakingtypes "cosmossdk.io/x/staking/types"<% } %> sdk "github.com/cosmos/cosmos-sdk/types" - <%= if (dependencies.Contains("Authz")) { %>"github.com/cosmos/cosmos-sdk/x/authz"<% } %> + <%= if (dependencies.Contains("Authz")) { %>"cosmossdk.io/x/authz"<% } %> ) <%= for (dependency) in dependencies { %> diff --git a/ignite/templates/module/create/files/ibc/testutil/keeper/{{moduleName}}.go.plush b/ignite/templates/module/create/files/ibc/testutil/keeper/{{moduleName}}.go.plush index 3d47d53500..a5b31e019e 100644 --- a/ignite/templates/module/create/files/ibc/testutil/keeper/{{moduleName}}.go.plush +++ b/ignite/templates/module/create/files/ibc/testutil/keeper/{{moduleName}}.go.plush @@ -8,14 +8,13 @@ import ( "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "cosmossdk.io/x/gov/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" portkeeper "github.com/cosmos/ibc-go/v8/modules/core/05-port/keeper" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" @@ -63,7 +62,7 @@ func <%= title(moduleName) %>Keeper(t testing.TB) (keeper.Keeper, sdk.Context, a nil,<% } %> ) - ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) + ctx := sdk.NewContext(stateStore, false, log.NewNopLogger()) // Initialize params if err := k.Params.Set(ctx, types.DefaultParams()); err != nil { diff --git a/ignite/templates/testutil/files/testutil/network/network.go.plush b/ignite/templates/testutil/files/testutil/network/network.go.plush index 8fe0ab5fd3..e06a58eb8a 100644 --- a/ignite/templates/testutil/files/testutil/network/network.go.plush +++ b/ignite/templates/testutil/files/testutil/network/network.go.plush @@ -10,14 +10,9 @@ import ( "<%= ModulePath %>/app" ) -type ( - Network = network.Network - Config = network.Config -) - // New creates instance with fully configured cosmos network. // Accepts optional config, that will be used in place of the DefaultConfig() if provided. -func New(t *testing.T, configs ...Config) *Network { +func New(t *testing.T, configs ...network.Config) network.NetworkI { t.Helper() if len(configs) > 1 { panic("at most one config should be provided") diff --git a/ignite/templates/typed/list/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush b/ignite/templates/typed/list/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush index 09cce408e6..3de285e06d 100644 --- a/ignite/templates/typed/list/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush +++ b/ignite/templates/typed/list/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush @@ -5,7 +5,6 @@ import ( "<%= ModulePath %>/x/<%= ModuleName %>/keeper" "<%= ModulePath %>/x/<%= ModuleName %>/types" - "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -18,7 +17,7 @@ func SimulateMsgCreate<%= TypeName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) @@ -49,7 +48,7 @@ func SimulateMsgUpdate<%= TypeName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { var ( simAccount = simtypes.Account{} @@ -103,7 +102,7 @@ func SimulateMsgDelete<%= TypeName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { var ( simAccount = simtypes.Account{} diff --git a/ignite/templates/typed/list/list.go b/ignite/templates/typed/list/list.go index 7560e2d2dd..c3aa8f94f8 100644 --- a/ignite/templates/typed/list/list.go +++ b/ignite/templates/typed/list/list.go @@ -354,7 +354,7 @@ func typesCodecModify(replacer placeholder.Replacer, opts *typed.Options) genny. content := replacer.ReplaceOnce(f.String(), typed.Placeholder, replacementImport) // Interface - templateInterface := `registry.RegisterImplementations((*sdk.Msg)(nil), + templateInterface := `registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgCreate%[2]v{}, &MsgUpdate%[2]v{}, &MsgDelete%[2]v{}, diff --git a/ignite/templates/typed/map/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush b/ignite/templates/typed/map/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush index 17ea2a33bc..e80e9bfdf0 100644 --- a/ignite/templates/typed/map/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush +++ b/ignite/templates/typed/map/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush @@ -6,7 +6,6 @@ import ( "<%= ModulePath %>/x/<%= ModuleName %>/keeper" "<%= ModulePath %>/x/<%= ModuleName %>/types" - "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -22,7 +21,7 @@ func SimulateMsgCreate<%= TypeName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) @@ -60,7 +59,7 @@ func SimulateMsgUpdate<%= TypeName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { var ( simAccount = simtypes.Account{} @@ -114,7 +113,7 @@ func SimulateMsgDelete<%= TypeName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { var ( simAccount = simtypes.Account{} diff --git a/ignite/templates/typed/map/map.go b/ignite/templates/typed/map/map.go index 29e1dfd252..c8aa92f3ed 100644 --- a/ignite/templates/typed/map/map.go +++ b/ignite/templates/typed/map/map.go @@ -710,7 +710,7 @@ func typesCodecModify(replacer placeholder.Replacer, opts *typed.Options) genny. content = replacer.ReplaceOnce(content, typed.Placeholder, replacementImport) // Interface - templateInterface := `registry.RegisterImplementations((*sdk.Msg)(nil), + templateInterface := `registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgCreate%[2]v{}, &MsgUpdate%[2]v{}, &MsgDelete%[2]v{}, diff --git a/ignite/templates/typed/simapp.go b/ignite/templates/typed/simapp.go index dd2458929b..a860983ce4 100644 --- a/ignite/templates/typed/simapp.go +++ b/ignite/templates/typed/simapp.go @@ -48,9 +48,9 @@ func ModuleSimulationMsgModify( templateOpMsg := `simulation.NewWeightedProposalMsg( opWeightMsg%[2]v%[3]v, defaultWeightMsg%[2]v%[3]v, - func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + func(r *rand.Rand, accs []simtypes.Account, cdc address.Codec) (sdk.Msg, error) { %[4]vsimulation.SimulateMsg%[2]v%[3]v(am.accountKeeper, am.bankKeeper, am.keeper, simState.TxConfig) - return nil + return nil, nil }, ), %[1]v` diff --git a/ignite/templates/typed/singleton/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush b/ignite/templates/typed/singleton/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush index 46c4b6fe1a..f36c3a7f62 100644 --- a/ignite/templates/typed/singleton/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush +++ b/ignite/templates/typed/singleton/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush @@ -7,7 +7,6 @@ import ( "<%= ModulePath %>/x/<%= ModuleName %>/keeper" "<%= ModulePath %>/x/<%= ModuleName %>/types" - "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -20,7 +19,7 @@ func SimulateMsgCreate<%= TypeName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) @@ -56,7 +55,7 @@ func SimulateMsgUpdate<%= TypeName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { var ( simAccount = simtypes.Account{} @@ -95,7 +94,7 @@ func SimulateMsgDelete<%= TypeName.UpperCamel %>( k keeper.Keeper, txGen client.TxConfig, ) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { var ( simAccount = simtypes.Account{} diff --git a/ignite/templates/typed/singleton/singleton.go b/ignite/templates/typed/singleton/singleton.go index 3c1819f7f9..a3dfb1cdd5 100644 --- a/ignite/templates/typed/singleton/singleton.go +++ b/ignite/templates/typed/singleton/singleton.go @@ -565,7 +565,7 @@ func typesCodecModify(replacer placeholder.Replacer, opts *typed.Options) genny. content = replacer.ReplaceOnce(content, typed.Placeholder, replacementImport) // Interface - templateInterface := `registry.RegisterImplementations((*sdk.Msg)(nil), + templateInterface := `registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgCreate%[2]v{}, &MsgUpdate%[2]v{}, &MsgDelete%[2]v{}, diff --git a/integration/app/cmd_app_test.go b/integration/app/cmd_app_test.go index 0f1bf3fd82..1c04a9be68 100644 --- a/integration/app/cmd_app_test.go +++ b/integration/app/cmd_app_test.go @@ -160,7 +160,7 @@ func TestGenerateAppWithEmptyModule(t *testing.T) { "--yes", "with_dep", "--dep", - "account,bank,staking,slashing,example", + "auth,bank,staking,slashing,example", "--require-registration", ), step.Workdir(app.SourcePath()), diff --git a/integration/cosmosgen/cosmosgen_composables_test.go b/integration/cosmosgen/cosmosgen_composables_test.go index 79f2695970..1507a23338 100644 --- a/integration/cosmosgen/cosmosgen_composables_test.go +++ b/integration/cosmosgen/cosmosgen_composables_test.go @@ -121,7 +121,6 @@ func TestCosmosGenScaffoldComposables(t *testing.T) { "useCosmosAuthzV1Beta1", "useCosmosBankV1Beta1", "useCosmosBaseTendermintV1Beta1", - "useCosmosCrisisV1Beta1", "useCosmosDistributionV1Beta1", "useCosmosEvidenceV1Beta1", "useCosmosFeegrantV1Beta1", diff --git a/integration/cosmosgen/cosmosgen_hooks_test.go b/integration/cosmosgen/cosmosgen_hooks_test.go index d682371257..19b33bb7d8 100644 --- a/integration/cosmosgen/cosmosgen_hooks_test.go +++ b/integration/cosmosgen/cosmosgen_hooks_test.go @@ -121,7 +121,6 @@ func TestCosmosGenScaffoldHooks(t *testing.T) { "useCosmosAuthzV1Beta1", "useCosmosBankV1Beta1", "useCosmosBaseTendermintV1Beta1", - "useCosmosCrisisV1Beta1", "useCosmosDistributionV1Beta1", "useCosmosEvidenceV1Beta1", "useCosmosFeegrantV1Beta1", diff --git a/integration/cosmosgen/cosmosgen_test.go b/integration/cosmosgen/cosmosgen_test.go index c207435c33..c01ce6aac8 100644 --- a/integration/cosmosgen/cosmosgen_test.go +++ b/integration/cosmosgen/cosmosgen_test.go @@ -121,7 +121,6 @@ func TestCosmosGenScaffold(t *testing.T) { "cosmos.authz.v1beta1", "cosmos.bank.v1beta1", "cosmos.base.tendermint.v1beta1", - "cosmos.crisis.v1beta1", "cosmos.distribution.v1beta1", "cosmos.evidence.v1beta1", "cosmos.feegrant.v1beta1", diff --git a/integration/faucet/faucet_test.go b/integration/faucet/faucet_test.go index ae0da1c4e7..2674632245 100644 --- a/integration/faucet/faucet_test.go +++ b/integration/faucet/faucet_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" + banktypes "cosmossdk.io/x/bank/types" sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" diff --git a/integration/ibc/cmd_ibc_test.go b/integration/ibc/cmd_ibc_test.go index f83be26617..5792c9fe78 100644 --- a/integration/ibc/cmd_ibc_test.go +++ b/integration/ibc/cmd_ibc_test.go @@ -10,6 +10,8 @@ import ( ) func TestCreateModuleWithIBC(t *testing.T) { + t.Skip("skipping test as IBC isn't available with v0.52 yet") // https://github.com/ignite/cli/pull/4289 + var ( env = envtest.New(t) app = env.Scaffold("github.com/test/blogibc") @@ -96,7 +98,7 @@ func TestCreateModuleWithIBC(t *testing.T) { "with_dep", "--ibc", "--dep", - "account,bank,staking,slashing", + "auth,bank,staking,slashing", "--require-registration", ), step.Workdir(app.SourcePath()), @@ -107,6 +109,8 @@ func TestCreateModuleWithIBC(t *testing.T) { } func TestCreateIBCPacket(t *testing.T) { + t.Skip("skipping test as IBC isn't available with v0.52 yet") // https://github.com/ignite/cli/pull/4289 + var ( env = envtest.New(t) app = env.Scaffold("github.com/test/blogibcb") diff --git a/integration/plugin/testdata/example-plugin/go.mod b/integration/plugin/testdata/example-plugin/go.mod index 456ef5dac3..ee7bcbeb92 100644 --- a/integration/plugin/testdata/example-plugin/go.mod +++ b/integration/plugin/testdata/example-plugin/go.mod @@ -1,9 +1,14 @@ module example-plugin -go 1.23 +go 1.23.1 + +replace ( + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.1 + github.com/ignite/cli/v29 => ../../../../ +) require ( - github.com/hashicorp/go-plugin v1.6.0 + github.com/hashicorp/go-plugin v1.6.1 github.com/ignite/cli/v29 v29.0.0 ) @@ -16,16 +21,16 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/charmbracelet/lipgloss v0.6.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-sdk v0.50.9 // indirect + github.com/cosmos/cosmos-sdk v0.52.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/color v1.17.0 // indirect github.com/fatih/structs v1.1.0 // indirect - github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/getsentry/sentry-go v0.28.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-git/go-git/v5 v5.12.0 // indirect @@ -49,7 +54,7 @@ require ( github.com/gorilla/css v1.0.0 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.15 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect @@ -58,12 +63,12 @@ require ( github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/microcosm-cc/bluemonday v1.0.23 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.15.1 // indirect + github.com/muesli/termenv v0.15.2 // indirect github.com/oklog/run v1.1.0 // indirect github.com/otiai10/copy v1.14.0 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect @@ -78,21 +83,19 @@ require ( github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - go.etcd.io/bbolt v1.3.9 // indirect - golang.org/x/crypto v0.26.0 // indirect - golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.28.0 // indirect + go.etcd.io/bbolt v1.4.0-alpha.1 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - golang.org/x/tools v0.24.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/tools v0.25.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect - google.golang.org/grpc v1.64.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.66.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/ignite/cli/v29 => ../../../../