From 85fc8f78a024c84dc3779edbb89bee328001cb95 Mon Sep 17 00:00:00 2001 From: Alex Johnson Date: Fri, 24 Mar 2023 08:34:25 -0400 Subject: [PATCH] chore: lint fixes (#356) * update lint * easy fixes * loop fixes * review suggestions --- app/config.go | 2 +- app/keepers/keepers.go | 2 +- app/test_helpers.go | 2 +- app/upgrades/upgrades.go | 2 +- cmd/quicksilverd/forceprune.go | 12 +- go.mod | 70 ++++----- go.sum | 147 +++++++++--------- test/e2e/configurer/chain/node.go | 6 +- test/e2e/configurer/setup.go | 17 +- test/e2e/containers/containers.go | 5 +- test/e2e/initialization/chain.go | 2 +- test/e2e/initialization/config.go | 6 +- test/e2e/initialization/init.go | 4 +- test/simulation/simtypes/account.go | 2 +- utils/proofs.go | 4 +- utils/verify.go | 4 +- wasmbinding/message_plugin.go | 4 +- x/airdrop/handler.go | 28 ---- x/airdrop/keeper/hooks.go | 4 +- x/airdrop/keeper/keeper.go | 2 +- x/airdrop/module.go | 18 +-- x/airdrop/types/proposals.go | 6 +- x/claimsmanager/handler.go | 18 --- x/claimsmanager/keeper/abci.go | 2 +- x/claimsmanager/keeper/claims.go | 2 +- x/claimsmanager/keeper/claims_test.go | 2 +- x/claimsmanager/keeper/hooks.go | 2 +- x/claimsmanager/module.go | 17 +- x/claimsmanager/types/codec.go | 2 +- x/epochs/handler.go | 20 --- x/epochs/module.go | 20 +-- x/epochs/types/identifier.go | 6 +- x/interchainquery/genesis_test.go | 1 - x/interchainquery/handler.go | 20 --- x/interchainquery/keeper/abci_test.go | 1 - x/interchainquery/keeper/grpc_query_test.go | 1 - x/interchainquery/keeper/keeper.go | 2 +- x/interchainquery/keeper/keeper_test.go | 4 - x/interchainquery/keeper/queries.go | 2 +- x/interchainquery/keeper/queries_test.go | 1 - x/interchainquery/module.go | 20 +-- x/interchainstaking/handler.go | 22 --- x/interchainstaking/ibc_module.go | 68 ++++---- x/interchainstaking/keeper/callbacks.go | 2 +- x/interchainstaking/keeper/delegation.go | 4 +- .../keeper/ibc_channel_handlers.go | 8 +- .../keeper/ibc_packet_handlers.go | 10 +- x/interchainstaking/keeper/keeper.go | 2 +- x/interchainstaking/keeper/msg_server.go | 4 +- x/interchainstaking/keeper/receipt.go | 7 +- x/interchainstaking/keeper/redemptions.go | 27 ++-- x/interchainstaking/keeper/zones.go | 7 +- x/interchainstaking/module.go | 20 +-- x/interchainstaking/types/accounts.go | 2 +- x/interchainstaking/types/accounts_test.go | 4 +- x/interchainstaking/types/rebalance.go | 7 +- x/interchainstaking/types/redemptions.go | 4 +- x/interchainstaking/types/zones.go | 2 +- x/interchainstaking/types/zones_test.go | 4 +- x/mint/genesis.go | 2 +- x/mint/keeper/hooks.go | 2 +- x/mint/keeper/keeper.go | 10 +- x/mint/module.go | 14 +- x/mint/types/params.go | 14 +- x/participationrewards/handler.go | 18 --- x/participationrewards/keeper/abci.go | 2 +- x/participationrewards/keeper/distribution.go | 6 +- x/participationrewards/keeper/hooks.go | 2 +- x/participationrewards/keeper/keeper_test.go | 4 +- x/participationrewards/keeper/msg_server.go | 2 +- .../keeper/protocol_data.go | 4 +- .../keeper/submodule_liquid.go | 2 +- x/participationrewards/module.go | 18 +-- x/participationrewards/types/proposals.go | 2 +- x/tokenfactory/keeper/createdenom.go | 6 +- x/tokenfactory/keeper/grpc_query.go | 2 +- x/tokenfactory/module.go | 11 +- x/tokenfactory/types/params.go | 6 +- 78 files changed, 317 insertions(+), 506 deletions(-) delete mode 100644 x/airdrop/handler.go delete mode 100644 x/claimsmanager/handler.go delete mode 100644 x/epochs/handler.go delete mode 100644 x/interchainquery/handler.go diff --git a/app/config.go b/app/config.go index 4c891e0ce..d9f76a766 100644 --- a/app/config.go +++ b/app/config.go @@ -53,7 +53,7 @@ func NewAppConstructor(encCfg EncodingConfig) network.AppConstructor { map[int64]bool{}, DefaultNodeHome, 0, - MakeEncodingConfig(), + encCfg, wasm.EnableAllProposals, EmptyAppOptions{}, GetWasmOpts(EmptyAppOptions{}), diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index db257bb89..0c3cb8a7c 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -192,7 +192,7 @@ func (appKeepers *AppKeepers) InitKeepers( mock bool, homePath string, invCheckPeriod uint, - appOpts servertypes.AppOptions, + _ servertypes.AppOptions, wasmDir string, wasmConfig wasm.Config, wasmEnabledProposals []wasm.ProposalType, diff --git a/app/test_helpers.go b/app/test_helpers.go index 46884a324..1ff9a9c66 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -31,7 +31,7 @@ import ( type EmptyAppOptions struct{} // Get implements AppOptions -func (ao EmptyAppOptions) Get(o string) interface{} { +func (ao EmptyAppOptions) Get(_ string) interface{} { return nil } diff --git a/app/upgrades/upgrades.go b/app/upgrades/upgrades.go index 252dbbd3d..3765d1123 100644 --- a/app/upgrades/upgrades.go +++ b/app/upgrades/upgrades.go @@ -49,7 +49,7 @@ func Upgrades() []Upgrade { func NoOpHandler( mm *module.Manager, configurator module.Configurator, - keepers *keepers.AppKeepers, + _ *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, configurator, fromVM) diff --git a/cmd/quicksilverd/forceprune.go b/cmd/quicksilverd/forceprune.go index d8193a029..abf02e932 100644 --- a/cmd/quicksilverd/forceprune.go +++ b/cmd/quicksilverd/forceprune.go @@ -145,10 +145,8 @@ func compactBlockStore(dbPath string) (err error) { if err != nil { return err } - if err = db.CompactRange(*util.BytesPrefix([]byte{})); err != nil { - return err - } - return nil + + return db.CompactRange(*util.BytesPrefix([]byte{})) } // forcepruneStateStore prunes and compacts state storage. @@ -202,8 +200,6 @@ func forcepruneStateStore(dbPath string, startHeight, currentHeight, minHeight, } fmt.Println("Compacting State Store ...") - if err = db.CompactRange(*util.BytesPrefix([]byte{})); err != nil { - return err - } - return nil + + return db.CompactRange(*util.BytesPrefix([]byte{})) } diff --git a/go.mod b/go.mod index 7c513be72..5f0e034c1 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/cosmos/ibc-go/v5 v5.2.0 github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.2 - github.com/golangci/golangci-lint v1.51.2 + github.com/golangci/golangci-lint v1.52.0 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/iqlusioninc/liquidity-staking-module v1.0.0 @@ -27,7 +27,7 @@ require ( github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b go.opencensus.io v0.24.0 golang.org/x/exp v0.0.0-20220914170420-dc92f8653013 - golang.org/x/tools v0.6.0 + golang.org/x/tools v0.7.0 google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef google.golang.org/grpc v1.52.0 google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 @@ -47,9 +47,9 @@ require ( filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect - github.com/Abirdcfly/dupword v0.0.9 // indirect - github.com/Antonboom/errname v0.1.7 // indirect - github.com/Antonboom/nilnil v0.1.1 // indirect + github.com/Abirdcfly/dupword v0.0.11 // indirect + github.com/Antonboom/errname v0.1.9 // indirect + github.com/Antonboom/nilnil v0.1.3 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/BurntSushi/toml v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect @@ -65,7 +65,7 @@ require ( 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.4.0 // indirect + github.com/ashanbrown/forbidigo v1.5.1 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect github.com/aws/aws-sdk-go v1.44.122 // indirect github.com/benbjohnson/clock v1.3.0 // indirect @@ -75,15 +75,15 @@ require ( github.com/bkielbasa/cyclop v1.2.0 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect github.com/bombsimon/wsl/v3 v3.4.0 // indirect - github.com/breml/bidichk v0.2.3 // indirect - github.com/breml/errchkjson v0.3.0 // indirect + github.com/breml/bidichk v0.2.4 // indirect + github.com/breml/errchkjson v0.3.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/butuzov/ireturn v0.1.1 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/charithe/durationcheck v0.0.9 // indirect - github.com/chavacava/garif v0.0.0-20221024190013-b3ef35877348 // indirect + github.com/charithe/durationcheck v0.0.10 // indirect + github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.8.1 // indirect @@ -101,7 +101,7 @@ require ( github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect - github.com/daixiang0/gci v0.9.1 // indirect + github.com/daixiang0/gci v0.10.1 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect @@ -119,18 +119,18 @@ require ( 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.14.1 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.2 // 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/go-critic/go-critic v0.6.7 // indirect + github.com/go-critic/go-critic v0.7.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect - github.com/go-toolsmith/astcopy v1.0.3 // indirect + github.com/go-toolsmith/astcopy v1.1.0 // indirect github.com/go-toolsmith/astequal v1.1.0 // indirect github.com/go-toolsmith/astfmt v1.1.0 // indirect github.com/go-toolsmith/astp v1.1.0 // indirect @@ -193,10 +193,10 @@ require ( 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/junk1tm/musttag v0.4.5 // indirect + github.com/junk1tm/musttag v0.5.0 // indirect github.com/kisielk/errcheck v1.6.3 // indirect github.com/kisielk/gotool v1.0.0 // indirect - github.com/kkHAIKE/contextcheck v1.1.3 // indirect + github.com/kkHAIKE/contextcheck v1.1.4 // indirect github.com/klauspost/compress v1.15.15 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/kr/text v0.2.0 // indirect @@ -213,27 +213,27 @@ require ( 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/maratori/testpackage v1.1.1 // indirect + github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-runewidth v0.0.10 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/revive v1.2.5 // indirect + github.com/mgechev/revive v1.3.1 // 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.0.0-20220808134915-39b0c02b01ae // indirect - github.com/moricho/tparallel v0.2.1 // indirect + github.com/moricho/tparallel v0.3.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.9.5 // indirect github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.8.1 // indirect + github.com/nunnatsa/ginkgolinter v0.9.0 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -243,13 +243,13 @@ require ( github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.1.0 // indirect + github.com/polyfloyd/go-errorlint v1.4.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect github.com/quasilyte/go-ruleguard v0.3.19 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect - github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect @@ -269,7 +269,7 @@ require ( github.com/sivchari/containedctx v1.0.2 // indirect github.com/sivchari/nosnakecase v1.7.0 // indirect github.com/sivchari/tenv v1.7.1 // indirect - github.com/sonatard/noctx v0.0.1 // indirect + github.com/sonatard/noctx v0.0.2 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.9.3 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -280,14 +280,14 @@ require ( github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect - github.com/tdakkota/asciicheck v0.1.1 // indirect + github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tetafro/godot v1.4.11 // indirect github.com/tidwall/btree v1.5.0 // indirect github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e // indirect - github.com/timonwong/loggercheck v0.9.3 // indirect - github.com/tomarrell/wrapcheck/v2 v2.8.0 // indirect + github.com/timonwong/loggercheck v0.9.4 // indirect + github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ulikunitz/xz v0.5.10 // indirect github.com/ultraware/funlen v0.0.3 // indirect @@ -305,22 +305,22 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/goleak v1.1.12 // indirect go.uber.org/multierr v1.9.0 // indirect - go.uber.org/zap v1.23.0 // indirect + go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.5.0 // indirect - golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9 // indirect - golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.7.0 // indirect + golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect + golang.org/x/mod v0.9.0 // indirect + golang.org/x/net v0.8.0 // indirect golang.org/x/oauth2 v0.1.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/term v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.107.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.4.2 // indirect + honnef.co/go/tools v0.4.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-20221223090309-7455f1af531d // indirect diff --git a/go.sum b/go.sum index 8f8fc73d6..6b37ba571 100644 --- a/go.sum +++ b/go.sum @@ -208,13 +208,13 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/Abirdcfly/dupword v0.0.9 h1:MxprGjKq3yDBICXDgEEsyGirIXfMYXkLNT/agPsE1tk= -github.com/Abirdcfly/dupword v0.0.9/go.mod h1:PzmHVLLZ27MvHSzV7eFmMXSFArWXZPZmfuuziuUrf2g= +github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU= +github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/Antonboom/errname v0.1.7 h1:mBBDKvEYwPl4WFFNwec1CZO096G6vzK9vvDQzAwkako= -github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= -github.com/Antonboom/nilnil v0.1.1 h1:PHhrh5ANKFWRBh7TdYmyyq2gyT2lotnvFvvFbylF81Q= -github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= +github.com/Antonboom/errname v0.1.9 h1:BZDX4r3l4TBZxZ2o2LNrlGxSHran4d1u4veZdoORTT4= +github.com/Antonboom/errname v0.1.9/go.mod h1:nLTcJzevREuAsgTbG85UsuiWpMpAqbKD1HNZ29OzE58= +github.com/Antonboom/nilnil v0.1.3 h1:6RTbx3d2mcEu3Zwq9TowQpQMVpP75zugwOtqY1RTtcE= +github.com/Antonboom/nilnil v0.1.3/go.mod h1:iOov/7gRcXkeEU+EMGpBu2ORih3iyVEiWjeste1SJm8= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= @@ -288,8 +288,8 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/ashanbrown/forbidigo v1.4.0 h1:spdPbupaSqtWORq1Q4eHBoPBmHtwVyLKwaedbSLc5Sw= -github.com/ashanbrown/forbidigo v1.4.0/go.mod h1:IvgwB5Y4fzqSAj/WVXKWigoTkB0dzI2FBbpKWuh7ph8= +github.com/ashanbrown/forbidigo v1.5.1 h1:WXhzLjOlnuDYPYQo/eFlcFMi8X/kLfvWLYu6CSoebis= +github.com/ashanbrown/forbidigo v1.5.1/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= @@ -326,10 +326,10 @@ github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+Wji github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= -github.com/breml/bidichk v0.2.3 h1:qe6ggxpTfA8E75hdjWPZ581sY3a2lnl0IRxLQFelECI= -github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= -github.com/breml/errchkjson v0.3.0 h1:YdDqhfqMT+I1vIxPSas44P+9Z9HzJwCeAzjB8PxP1xw= -github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= +github.com/breml/bidichk v0.2.4 h1:i3yedFWWQ7YzjdZJHnPo9d/xURinSq3OM+gyM43K4/8= +github.com/breml/bidichk v0.2.4/go.mod h1:7Zk0kRFt1LIZxtQdl9W9JwGAcLTTkOs+tN7wuEYGJ3s= +github.com/breml/errchkjson v0.3.1 h1:hlIeXuspTyt8Y/UmP5qy1JocGNR00KQHgfaNtRAjoxQ= +github.com/breml/errchkjson v0.3.1/go.mod h1:XroxrzKjdiutFyW3nWhw34VGg7kiMsDQox73yWCGI2U= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= @@ -372,10 +372,10 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.9 h1:mPP4ucLrf/rKZiIG/a9IPXHGlh8p4CzgpyTy6EEutYk= -github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= -github.com/chavacava/garif v0.0.0-20221024190013-b3ef35877348 h1:cy5GCEZLUCshCGCRRUjxHrDUqkB4l5cuUt3ShEckQEo= -github.com/chavacava/garif v0.0.0-20221024190013-b3ef35877348/go.mod h1:f/miWtG3SSuTxKsNK3o58H1xl+XV6ZIfbC6p7lPPB8U= +github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= +github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= +github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 h1:W9o46d2kbNL06lq7UNDPV0zYLzkrde/bjIqO02eoll0= +github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= @@ -472,8 +472,8 @@ github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDU github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/daixiang0/gci v0.9.1 h1:jBrwBmBZTDsGsXiaCTLIe9diotp1X4X64zodFrh7l+c= -github.com/daixiang0/gci v0.9.1/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= +github.com/daixiang0/gci v0.10.1 h1:eheNA3ljF6SxnPD/vE4lCBusVHmV3Rs3dkKvFrJ7MR0= +github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -558,8 +558,8 @@ github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpm github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= @@ -595,8 +595,8 @@ github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-critic/go-critic v0.6.7 h1:1evPrElnLQ2LZtJfmNDzlieDhjnq36SLgNzisx06oPM= -github.com/go-critic/go-critic v0.6.7/go.mod h1:fYZUijFdcnxgx6wPjQA2QEjIRaNCT0gO8bhexy6/QmE= +github.com/go-critic/go-critic v0.7.0 h1:tqbKzB8pqi0NsRZ+1pyU4aweAF7A7QN0Pi4Q02+rYnQ= +github.com/go-critic/go-critic v0.7.0/go.mod h1:moYzd7GdVXE2C2hYTwd7h0CPcqlUeclsyBRwMa38v64= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -635,9 +635,8 @@ github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= -github.com/go-toolsmith/astcopy v1.0.3 h1:r0bgSRlMOAgO+BdQnVAcpMSMkrQCnV6ZJmIkrJgcJj0= -github.com/go-toolsmith/astcopy v1.0.3/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuLh4aLAck6dO7Y= -github.com/go-toolsmith/astequal v1.0.2/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= +github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= @@ -645,7 +644,7 @@ github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsO github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= -github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5 h1:eD9POs68PHkwrx7hAB78z1cb6PfGq/jyWn3wJywsH1o= +github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= @@ -728,8 +727,8 @@ github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6 github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzrdA+Nx5WA3tV1N0goTspwmKCQvBY= github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= -github.com/golangci/golangci-lint v1.51.2 h1:yIcsT1X9ZYHdSpeWXRT1ORC/FPGSqDHbHsu9uk4FK7M= -github.com/golangci/golangci-lint v1.51.2/go.mod h1:KH9Q7/3glwpYSknxUgUyLlAv46A8fsSKo1hH2wDvkr8= +github.com/golangci/golangci-lint v1.52.0 h1:T7w3tuF1goz64qGV+ML4MgysSl/yUfA3UZJK92oE48A= +github.com/golangci/golangci-lint v1.52.0/go.mod h1:wlTh+d/oVlgZC2yCe6nlxrxNAnuhEQC0Zdygoh72Uak= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= @@ -838,11 +837,8 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= @@ -990,8 +986,8 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 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/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/junk1tm/musttag v0.4.5 h1:d+mpJ1vn6WFEVKHwkgJiIedis1u/EawKOuUTygAUtCo= -github.com/junk1tm/musttag v0.4.5/go.mod h1:XkcL/9O6RmD88JBXb+I15nYRl9W4ExhgQeCBEhfMC8U= +github.com/junk1tm/musttag v0.5.0 h1:bV1DTdi38Hi4pG4OVWa7Kap0hi0o7EczuK6wQt9zPOM= +github.com/junk1tm/musttag v0.5.0/go.mod h1:PcR7BA+oREQYvHwgjIDmw3exJeds5JzRcvEJTfjrA0M= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= @@ -1004,8 +1000,8 @@ github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkHAIKE/contextcheck v1.1.3 h1:l4pNvrb8JSwRd51ojtcOxOeHJzHek+MtOyXbaR0uvmw= -github.com/kkHAIKE/contextcheck v1.1.3/go.mod h1:PG/cwd6c0705/LM0KTr1acO2gORUxkSVWyLJOFW5qoo= +github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= +github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -1073,10 +1069,10 @@ github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYt github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= -github.com/maratori/testpackage v1.1.0 h1:GJY4wlzQhuBusMF1oahQCBtUV/AQ/k69IZ68vxaac2Q= -github.com/maratori/testpackage v1.1.0/go.mod h1:PeAhzU8qkCwdGEMTEupsHJNlQu2gZopMC6RjbhmHeDc= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= +github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= @@ -1113,8 +1109,8 @@ github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwg github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= -github.com/mgechev/revive v1.2.5 h1:UF9AR8pOAuwNmhXj2odp4mxv9Nx2qUIwVz8ZsU+Mbec= -github.com/mgechev/revive v1.2.5/go.mod h1:nFOXent79jMTISAfOAasKfy0Z2Ejq0WX7Qn/KAdYopI= +github.com/mgechev/revive v1.3.1 h1:OlQkcH40IB2cGuprTPcjB0iIUddgVZgGmDX3IAMR8D4= +github.com/mgechev/revive v1.3.1/go.mod h1:YlD6TTWl2B8A103R9KWJSPVI9DrEf+oqr15q21Ld+5I= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= @@ -1149,8 +1145,8 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= +github.com/moricho/tparallel v0.3.0 h1:8dDx3S3e+jA+xiQXC7O3dvfRTe/J+FYlTDDW01Y7z/Q= +github.com/moricho/tparallel v0.3.0/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= @@ -1187,8 +1183,8 @@ github.com/notional-labs/tm-db v0.6.8-0.20230214123107-77c191d0f7ee h1:wr7Se0X/S github.com/notional-labs/tm-db v0.6.8-0.20230214123107-77c191d0f7ee/go.mod h1:lD+ep9hiDc0VXg9gZcI14OQuxkt+Dubtsz2FDzPlPvQ= github.com/notional-labs/wasmd v0.29.0-sdk46.0.20221114145317-d6e67fd50956 h1:gT+v1UFkZAL9GK5paedZPxL8Venc7SqbrAuKBh1q5Jk= github.com/notional-labs/wasmd v0.29.0-sdk46.0.20221114145317-d6e67fd50956/go.mod h1:n0HuoJR2cMpg9jKqR+x+KGO/rQsrzsDPEsgwHHs70dM= -github.com/nunnatsa/ginkgolinter v0.8.1 h1:/y4o/0hV+ruUHj4xXh89xlFjoaitnI4LnkpuYs02q1c= -github.com/nunnatsa/ginkgolinter v0.8.1/go.mod h1:FYYLtszIdmzCH8XMaMPyxPVXZ7VCaIm55bA+gugx+14= +github.com/nunnatsa/ginkgolinter v0.9.0 h1:Sm0zX5QfjJzkeCjEp+t6d3Ha0jwvoDjleP9XCsrEzOA= +github.com/nunnatsa/ginkgolinter v0.9.0/go.mod h1:FHaMLURXP7qImeH6bvxWJUpyH+2tuqe5j4rW1gxJRmI= 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= @@ -1269,8 +1265,8 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.1.0 h1:VKoEFg5yxSgJ2yFPVhxW7oGz+f8/OVcuMeNvcPIi6Eg= -github.com/polyfloyd/go-errorlint v1.1.0/go.mod h1:Uss7Bc/izYG0leCMRx3WVlrpqWedSZk7V/FUQW6VJ6U= +github.com/polyfloyd/go-errorlint v1.4.0 h1:b+sQ5HibPIAjEZwtuwU8Wz/u0dMZ7YL+bk+9yWyHVJk= +github.com/polyfloyd/go-errorlint v1.4.0/go.mod h1:qJCkPeBn+0EXkdKTrUCcuFStM2xrDKfxI3MGLXPexUs= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= 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= @@ -1317,8 +1313,8 @@ github.com/quasilyte/go-ruleguard v0.3.19 h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZy github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= @@ -1398,8 +1394,8 @@ github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl01 github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= +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/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= @@ -1459,8 +1455,8 @@ github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= -github.com/tdakkota/asciicheck v0.1.1 h1:PKzG7JUTUmVspQTDqtkX9eSiLGossXTybutHwTXuO0A= -github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= +github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= +github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= @@ -1480,15 +1476,15 @@ github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhso github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e h1:MV6KaVu/hzByHP0UvJ4HcMGE/8a6A4Rggc/0wx2AvJo= github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= -github.com/timonwong/loggercheck v0.9.3 h1:ecACo9fNiHxX4/Bc02rW2+kaJIAMAes7qJ7JKxt0EZI= -github.com/timonwong/loggercheck v0.9.3/go.mod h1:wUqnk9yAOIKtGA39l1KLE9Iz0QiTocu/YZoOf+OzFdw= +github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= +github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.8.0 h1:qDzbir0xmoE+aNxGCPrn+rUSxAX+nG6vREgbbXAR81I= -github.com/tomarrell/wrapcheck/v2 v2.8.0/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= +github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= +github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= @@ -1585,8 +1581,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= -go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1630,8 +1626,9 @@ golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8H golang.org/x/exp v0.0.0-20220914170420-dc92f8653013 h1:ZjglnWxEUdPyXl4o/j4T89SRCI+4X6NW6185PNLEOF4= golang.org/x/exp v0.0.0-20220914170420-dc92f8653013/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= 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 h1:6WHiuFL9FNjg8RljAaT7FNUuKDbvMqS1i5cr2OE2sLQ= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= +golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1663,8 +1660,9 @@ golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 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 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1736,8 +1734,9 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= 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= @@ -1898,8 +1897,9 @@ 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= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1907,8 +1907,9 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1921,8 +1922,9 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.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 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1936,9 +1938,7 @@ golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1968,7 +1968,6 @@ golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1981,19 +1980,16 @@ golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2020,8 +2016,9 @@ 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.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2323,8 +2320,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -honnef.co/go/tools v0.4.2 h1:6qXr+R5w+ktL5UkwEbPp+fEvfyoMPche6GkOpGHZcLc= -honnef.co/go/tools v0.4.2/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= +honnef.co/go/tools v0.4.3 h1:o/n5/K5gXqk8Gozvs2cnL0F2S1/g1vcGCAx2vETjITw= +honnef.co/go/tools v0.4.3/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= mvdan.cc/gofumpt v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM= mvdan.cc/gofumpt v0.4.0/go.mod h1:PljLOHDeZqgS8opHRKLzp2It2VBuSdteAgqUfzMTxlQ= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= diff --git a/test/e2e/configurer/chain/node.go b/test/e2e/configurer/chain/node.go index 3408c66bf..a3a61d9e1 100644 --- a/test/e2e/configurer/chain/node.go +++ b/test/e2e/configurer/chain/node.go @@ -76,11 +76,7 @@ func (n *NodeConfig) Run() error { "Quicksilver node failed to produce blocks", ) - if err := n.extractOperatorAddressIfValidator(); err != nil { - return err - } - - return nil + return n.extractOperatorAddressIfValidator() } // Stop stops the node from running and removes its container. diff --git a/test/e2e/configurer/setup.go b/test/e2e/configurer/setup.go index 92ebfe438..5efab21b9 100644 --- a/test/e2e/configurer/setup.go +++ b/test/e2e/configurer/setup.go @@ -7,10 +7,7 @@ import ( type setupFn func(configurer Configurer) error func baseSetup(configurer Configurer) error { - if err := configurer.RunValidators(); err != nil { - return err - } - return nil + return configurer.RunValidators() } func withIBC(setupHandler setupFn) setupFn { @@ -27,11 +24,7 @@ func withIBC(setupHandler setupFn) setupFn { return err } - if err := configurer.RunXCC(); err != nil { - return err - } - - return nil + return configurer.RunXCC() } } @@ -50,10 +43,6 @@ func withUpgrade(setupHandler setupFn) setupFn { return err } - if err := upgradeConfigurer.RunUpgrade(); err != nil { - return err - } - - return nil + return upgradeConfigurer.RunUpgrade() } } diff --git a/test/e2e/containers/containers.go b/test/e2e/containers/containers.go index 653e1e431..925ec1d8a 100644 --- a/test/e2e/containers/containers.go +++ b/test/e2e/containers/containers.go @@ -503,10 +503,7 @@ func (m *Manager) ClearResources() error { } } - if err := m.pool.RemoveNetwork(m.network); err != nil { - return err - } - return nil + return m.pool.RemoveNetwork(m.network) } func noRestart(config *docker.HostConfig) { diff --git a/test/e2e/initialization/chain.go b/test/e2e/initialization/chain.go index 8792ac73a..268e0bceb 100644 --- a/test/e2e/initialization/chain.go +++ b/test/e2e/initialization/chain.go @@ -12,7 +12,7 @@ type internalChain struct { nodes []*internalNode } -func new(id, dataDir string) *internalChain { +func newInternal(id, dataDir string) *internalChain { chainMeta := ChainMeta{ ID: id, DataDir: dataDir, diff --git a/test/e2e/initialization/config.go b/test/e2e/initialization/config.go index 01e081b20..4730eff3e 100644 --- a/test/e2e/initialization/config.go +++ b/test/e2e/initialization/config.go @@ -138,7 +138,7 @@ func addAccount(path, moniker, amountStr string, accAddr sdk.AccAddress, forkHei return fmt.Errorf("failed to add account to genesis state; account already exists: %s", accAddr) } - // Add the new account to the set of genesis accounts and sanitize the + // Add the newInternal account to the set of genesis accounts and sanitize the // accounts afterwards. accs = append(accs, genAccount) accs = authtypes.SanitizeGenesisAccounts(accs) @@ -245,7 +245,7 @@ func initGenesis(chain *internalChain, votingPeriod time.Duration, forkHeight in return err } - err = updateModuleGenesis(appGenState, banktypes.ModuleName, &banktypes.GenesisState{}, updateBankGenesis(appGenState)) + err = updateModuleGenesis(appGenState, banktypes.ModuleName, &banktypes.GenesisState{}, updateBankGenesis()) if err != nil { return err } @@ -291,7 +291,7 @@ func initGenesis(chain *internalChain, votingPeriod time.Duration, forkHeight in return nil } -func updateBankGenesis(appGenState map[string]json.RawMessage) func(s *banktypes.GenesisState) { +func updateBankGenesis() func(s *banktypes.GenesisState) { return func(bankGenState *banktypes.GenesisState) { denomsToRegister := []string{StakeDenom, IonDenom, QuickDenom, AtomDenom, LuncIBCDenom, UstIBCDenom} for _, denom := range denomsToRegister { diff --git a/test/e2e/initialization/init.go b/test/e2e/initialization/init.go index 9312402ca..a84e9bba9 100644 --- a/test/e2e/initialization/init.go +++ b/test/e2e/initialization/init.go @@ -10,7 +10,7 @@ import ( ) func InitChain(id, dataDir string, nodeConfigs []*NodeConfig, votingPeriod time.Duration, forkHeight int) (*Chain, error) { - chain := new(id, dataDir) + chain := newInternal(id, dataDir) for _, nodeConfig := range nodeConfigs { newNode, err := newNode(chain, nodeConfig) if err != nil { @@ -45,7 +45,7 @@ func InitSingleNode(chainID, dataDir string, existingGenesisDir string, nodeConf return nil, errors.New("creating individual validator nodes after starting up chain is not currently supported") } - chain := new(chainID, dataDir) + chain := newInternal(chainID, dataDir) newNode, err := newNode(chain, nodeConfig) if err != nil { diff --git a/test/simulation/simtypes/account.go b/test/simulation/simtypes/account.go index 0a0fa79c7..5519806be 100644 --- a/test/simulation/simtypes/account.go +++ b/test/simulation/simtypes/account.go @@ -202,7 +202,7 @@ func RandCoinSubsetFromBalance(ctx sdk.Context, r *rand.Rand, addr sdk.AccAddres // RandomFees returns a random fee by selecting a random coin denomination and // amount from the account's available balance. If the user doesn't have enough // funds for paying fees, it returns empty coins. -func RandomFees(ctx sdk.Context, r *rand.Rand, spendableCoins sdk.Coins) (sdk.Coins, error) { +func RandomFees(r *rand.Rand, spendableCoins sdk.Coins) (sdk.Coins, error) { if spendableCoins.Empty() { return nil, nil } diff --git a/utils/proofs.go b/utils/proofs.go index e6dee5156..c4c5bee01 100644 --- a/utils/proofs.go +++ b/utils/proofs.go @@ -98,10 +98,10 @@ func ValidateSelfProofOps(ctx sdk.Context, claimsKeeper claimsmanagerkeeper.Keep return nil } -func MockSelfProofOps(ctx sdk.Context, claimsKeeper claimsmanagerkeeper.Keeper, consensusStateKey string, module string, key []byte, data []byte, proofOps *crypto.ProofOps) error { +func MockSelfProofOps(_ sdk.Context, _ claimsmanagerkeeper.Keeper, _ string, _ string, _ []byte, _ []byte, _ *crypto.ProofOps) error { return nil } -func MockProofOps(ctx sdk.Context, ibcKeeper *ibcKeeper.Keeper, connectionID string, chainID string, height int64, module string, key []byte, data []byte, proofOps *crypto.ProofOps) error { +func MockProofOps(_ sdk.Context, _ *ibcKeeper.Keeper, _ string, _ string, _ int64, _ string, _ []byte, _ []byte, _ *crypto.ProofOps) error { return nil } diff --git a/utils/verify.go b/utils/verify.go index cbdfc54ea..169b9c711 100644 --- a/utils/verify.go +++ b/utils/verify.go @@ -20,7 +20,7 @@ func VerifyNonAdjacent( untrustedVals *types.ValidatorSet, // height=Y trustingPeriod time.Duration, now time.Time, - maxClockDrift time.Duration, + _ time.Duration, trustLevel tmmath.Fraction, ) error { if untrustedHeader.Height == trustedHeader.Height+1 { @@ -68,7 +68,7 @@ func VerifyAdjacent( untrustedVals *types.ValidatorSet, // height=X+1 trustingPeriod time.Duration, now time.Time, - maxClockDrift time.Duration, + maxClockDrift time.Duration, //nolint:revive ) error { if untrustedHeader.Height != trustedHeader.Height+1 { return errors.New("headers must be adjacent in height") diff --git a/wasmbinding/message_plugin.go b/wasmbinding/message_plugin.go index f5257bb24..ebc6482e9 100644 --- a/wasmbinding/message_plugin.go +++ b/wasmbinding/message_plugin.go @@ -60,7 +60,7 @@ func (m *CustomMessenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddre // createDenom creates a new token denom func (m *CustomMessenger) createDenom(ctx sdk.Context, contractAddr sdk.AccAddress, createDenom *bindings.CreateDenom) ([]sdk.Event, [][]byte, error) { - err := PerformCreateDenom(m.tokenFactory, m.bank, ctx, contractAddr, createDenom) + err := PerformCreateDenom(m.tokenFactory, ctx, contractAddr, createDenom) if err != nil { return nil, nil, sdkioerrors.Wrap(err, "perform create denom") } @@ -68,7 +68,7 @@ func (m *CustomMessenger) createDenom(ctx sdk.Context, contractAddr sdk.AccAddre } // PerformCreateDenom is used with createDenom to create a token denom; validates the msgCreateDenom. -func PerformCreateDenom(f *tokenfactorykeeper.Keeper, b *bankkeeper.BaseKeeper, ctx sdk.Context, contractAddr sdk.AccAddress, createDenom *bindings.CreateDenom) error { +func PerformCreateDenom(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, createDenom *bindings.CreateDenom) error { if createDenom == nil { return wasmvmtypes.InvalidRequest{Err: "create denom null create denom"} } diff --git a/x/airdrop/handler.go b/x/airdrop/handler.go deleted file mode 100644 index 987b0edca..000000000 --- a/x/airdrop/handler.go +++ /dev/null @@ -1,28 +0,0 @@ -package airdrop - -import ( - sdkioerrors "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/ingenuity-build/quicksilver/x/airdrop/keeper" - "github.com/ingenuity-build/quicksilver/x/airdrop/types" -) - -// NewHandler returns a handler for airdrop module messages -func NewHandler(k keeper.Keeper) sdk.Handler { - msgServer := keeper.NewMsgServerImpl(k) - - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - - switch msg := msg.(type) { - case *types.MsgClaim: - res, err := msgServer.Claim(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - - default: - return nil, sdkioerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized airdrop message type: %T", msg) - } - } -} diff --git a/x/airdrop/keeper/hooks.go b/x/airdrop/keeper/hooks.go index 2b8a30d0a..b9ee24373 100644 --- a/x/airdrop/keeper/hooks.go +++ b/x/airdrop/keeper/hooks.go @@ -6,11 +6,11 @@ import ( epochstypes "github.com/ingenuity-build/quicksilver/x/epochs/types" ) -func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error { +func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64) error { return nil } -func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error { +func (k Keeper) AfterEpochEnd(_ sdk.Context, _ string, _ int64) error { return nil } diff --git a/x/airdrop/keeper/keeper.go b/x/airdrop/keeper/keeper.go index 6fec28b16..054f67aec 100644 --- a/x/airdrop/keeper/keeper.go +++ b/x/airdrop/keeper/keeper.go @@ -88,7 +88,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { } // GetModuleAccountAddress gets the airdrop module account address. -func (k Keeper) GetModuleAccountAddress(ctx sdk.Context) sdk.AccAddress { +func (k Keeper) GetModuleAccountAddress(_ sdk.Context) sdk.AccAddress { return k.accountKeeper.GetModuleAddress(types.ModuleName) } diff --git a/x/airdrop/module.go b/x/airdrop/module.go index ec8b704e5..abd09f5f1 100644 --- a/x/airdrop/module.go +++ b/x/airdrop/module.go @@ -59,7 +59,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the airdrop module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var gs types.GenesisState if err := cdc.UnmarshalJSON(bz, &gs); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -69,7 +69,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod } // RegisterRESTRoutes registers the airdrop module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} +func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. // This function will panic on failure. @@ -117,7 +117,7 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { // Route returns the message routing key for the airdrop module. func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) + return sdk.Route{} } // QuerierRoute returns the airdrop module's querier route name. @@ -126,7 +126,7 @@ func (AppModule) QuerierRoute() string { } // LegacyQuerierHandler returns the x/airdrop module's sdk.Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return func(sdk.Context, []string, abci.RequestQuery) ([]byte, error) { return nil, fmt.Errorf("legacy querier not supported for the x/%s module", types.ModuleName) } @@ -157,7 +157,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // BeginBlock executes all ABCI BeginBlock logic respective to the airdrop module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { } // EndBlock executes all ABCI EndBlock logic respective to the airdrop module. It @@ -175,22 +175,22 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the mint module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) { +func (AppModule) GenerateGenesisState(_ *module.SimulationState) { // simulation.RandomizedGenState(simState) } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // RandomizedParams creates randomized mint param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { return []simtypes.ParamChange{} } // RegisterStoreDecoder registers a decoder for mint module's types. -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { // sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) } diff --git a/x/airdrop/types/proposals.go b/x/airdrop/types/proposals.go index 5c0c6628d..4fe9fdfd6 100644 --- a/x/airdrop/types/proposals.go +++ b/x/airdrop/types/proposals.go @@ -41,11 +41,7 @@ func (m RegisterZoneDropProposal) ValidateBasic() error { } // validate ZoneDrop - if err := m.ZoneDrop.ValidateBasic(); err != nil { - return err - } - - return nil + return m.ZoneDrop.ValidateBasic() } // String implements the Stringer interface. diff --git a/x/claimsmanager/handler.go b/x/claimsmanager/handler.go deleted file mode 100644 index 19984564a..000000000 --- a/x/claimsmanager/handler.go +++ /dev/null @@ -1,18 +0,0 @@ -package claimsmanager - -import ( - sdkioerrors "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/ingenuity-build/quicksilver/x/claimsmanager/keeper" -) - -// NewHandler returns a handler for claimsmanager module messages -func NewHandler(k keeper.Keeper) sdk.Handler { - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - _ = ctx.WithEventManager(sdk.NewEventManager()) - - return nil, sdkioerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized claimsmanager message type: %T", msg) - } -} diff --git a/x/claimsmanager/keeper/abci.go b/x/claimsmanager/keeper/abci.go index f0c11f691..1ac9c7d6e 100644 --- a/x/claimsmanager/keeper/abci.go +++ b/x/claimsmanager/keeper/abci.go @@ -5,5 +5,5 @@ import ( ) // BeginBlocker of claimsmanager module -func (k Keeper) BeginBlocker(ctx sdk.Context) { +func (k Keeper) BeginBlocker(_ sdk.Context) { } diff --git a/x/claimsmanager/keeper/claims.go b/x/claimsmanager/keeper/claims.go index 73cbccb42..2bbc34941 100644 --- a/x/claimsmanager/keeper/claims.go +++ b/x/claimsmanager/keeper/claims.go @@ -7,7 +7,7 @@ import ( "github.com/ingenuity-build/quicksilver/x/claimsmanager/types" ) -func (k Keeper) NewClaim(ctx sdk.Context, address string, chainID string, module types.ClaimType, srcChainID string, amount uint64) types.Claim { +func (k Keeper) NewClaim(address string, chainID string, module types.ClaimType, srcChainID string, amount uint64) types.Claim { return types.Claim{UserAddress: address, ChainId: chainID, Module: module, SourceChainId: srcChainID, Amount: amount} } diff --git a/x/claimsmanager/keeper/claims_test.go b/x/claimsmanager/keeper/claims_test.go index 7014be5b5..7e2ec8de9 100644 --- a/x/claimsmanager/keeper/claims_test.go +++ b/x/claimsmanager/keeper/claims_test.go @@ -96,7 +96,7 @@ func (suite *KeeperTestSuite) TestKeeper_NewClaim() { k := suite.GetQuicksilverApp(suite.chainA).ClaimsManagerKeeper for _, tt := range tests { suite.Run(tt.name, func() { - got := k.NewClaim(suite.chainA.GetContext(), tt.args.address, tt.args.chainID, tt.args.module, tt.args.srcChainID, tt.args.amount) + got := k.NewClaim(tt.args.address, tt.args.chainID, tt.args.module, tt.args.srcChainID, tt.args.amount) suite.Require().Equal(tt.want, got) }) } diff --git a/x/claimsmanager/keeper/hooks.go b/x/claimsmanager/keeper/hooks.go index 3f0fd4835..e9a0d0d43 100644 --- a/x/claimsmanager/keeper/hooks.go +++ b/x/claimsmanager/keeper/hooks.go @@ -16,7 +16,7 @@ func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochN return nil } -func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error { +func (k Keeper) AfterEpochEnd(_ sdk.Context, _ string, _ int64) error { return nil } diff --git a/x/claimsmanager/module.go b/x/claimsmanager/module.go index abb5eb072..27dfa091d 100644 --- a/x/claimsmanager/module.go +++ b/x/claimsmanager/module.go @@ -59,7 +59,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the claimsmanager module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var gs types.GenesisState if err := cdc.UnmarshalJSON(bz, &gs); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -111,7 +111,7 @@ func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // Route returns the message routing key for the claimsmanager module. func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) + return sdk.Route{} } // QuerierRoute returns the claimsmanager module's querier route name. @@ -120,7 +120,7 @@ func (AppModule) QuerierRoute() string { } // LegacyQuerierHandler returns the x/claimsmanager module's sdk.Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return func(sdk.Context, []string, abci.RequestQuery) ([]byte, error) { return nil, fmt.Errorf("legacy querier not supported for the x/%s module", types.ModuleName) } @@ -157,7 +157,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { // EndBlock executes all ABCI EndBlock logic respective to the claimsmanager module. It // returns no validator updates. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -169,23 +169,22 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the mint module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) { +func (AppModule) GenerateGenesisState(_ *module.SimulationState) { // simulation.RandomizedGenState(simState) } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // RandomizedParams creates randomized mint param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { return []simtypes.ParamChange{} } // RegisterStoreDecoder registers a decoder for mint module's types. -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { - // sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) +func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { } // WeightedOperations doesn't return any mint module operation. diff --git a/x/claimsmanager/types/codec.go b/x/claimsmanager/types/codec.go index 71a7be9c1..fdc302f4f 100644 --- a/x/claimsmanager/types/codec.go +++ b/x/claimsmanager/types/codec.go @@ -16,7 +16,7 @@ var ( ModuleCdc = codec.NewAminoCodec(amino) ) -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { +func RegisterLegacyAminoCodec(_ *codec.LegacyAmino) { } func RegisterInterfaces(registry types.InterfaceRegistry) { diff --git a/x/epochs/handler.go b/x/epochs/handler.go deleted file mode 100644 index d1bbcb7b7..000000000 --- a/x/epochs/handler.go +++ /dev/null @@ -1,20 +0,0 @@ -package epochs - -import ( - "fmt" - - sdkioerrors "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/ingenuity-build/quicksilver/x/epochs/keeper" - "github.com/ingenuity-build/quicksilver/x/epochs/types" -) - -// NewHandler returns a handler for epochs module messages -func NewHandler(k keeper.Keeper) sdk.Handler { - return func(_ sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg) - return nil, sdkioerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - } -} diff --git a/x/epochs/module.go b/x/epochs/module.go index 94b526ed7..fc531fb0a 100644 --- a/x/epochs/module.go +++ b/x/epochs/module.go @@ -51,10 +51,10 @@ func (AppModuleBasic) Name() string { } // RegisterLegacyAminoCodec registers a legacy amino codec -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} +func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {} // RegisterInterfaces registers the module's interface types -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {} +func (a AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry) {} // DefaultGenesis returns the capability module's default genesis state. func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { @@ -62,7 +62,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the capability module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -114,14 +114,14 @@ func (am AppModule) Name() string { // Route returns the capability module's message routing key. func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) + return sdk.Route{} } // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } // LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return nil } @@ -158,7 +158,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { // EndBlock executes all ABCI EndBlock logic respective to the capability module. It // returns no validator updates. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -175,20 +175,20 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // RandomizedParams creates randomized pool-incentives param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { return nil } // RegisterStoreDecoder registers a decoder for supply module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { } // WeightedOperations returns the all the gov module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { +func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil // TODO } diff --git a/x/epochs/types/identifier.go b/x/epochs/types/identifier.go index ae0712dfc..cea719b4a 100644 --- a/x/epochs/types/identifier.go +++ b/x/epochs/types/identifier.go @@ -10,11 +10,7 @@ func ValidateEpochIdentifierInterface(i interface{}) error { if !ok { return fmt.Errorf("invalid parameter type: %T", i) } - if err := ValidateEpochIdentifierString(v); err != nil { - return err - } - - return nil + return ValidateEpochIdentifierString(v) } func ValidateEpochIdentifierString(s string) error { diff --git a/x/interchainquery/genesis_test.go b/x/interchainquery/genesis_test.go index 6477344c7..07a02a4ea 100644 --- a/x/interchainquery/genesis_test.go +++ b/x/interchainquery/genesis_test.go @@ -56,7 +56,6 @@ func (suite *InterChainQueryTestSuite) TestInitGenesis() { suite.NoError(err) query := suite.GetSimApp(suite.chainA).InterchainQueryKeeper.NewQuery( - suite.chainA.GetContext(), "", suite.path.EndpointB.ConnectionID, suite.chainB.ChainID, diff --git a/x/interchainquery/handler.go b/x/interchainquery/handler.go deleted file mode 100644 index 0115dac46..000000000 --- a/x/interchainquery/handler.go +++ /dev/null @@ -1,20 +0,0 @@ -package interchainquery - -import ( - "fmt" - - sdkioerrors "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/ingenuity-build/quicksilver/x/interchainquery/keeper" - "github.com/ingenuity-build/quicksilver/x/interchainquery/types" -) - -// NewHandler returns a handler for interchainquery module messages -func NewHandler(k keeper.Keeper) sdk.Handler { - return func(_ sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg) - return nil, sdkioerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - } -} diff --git a/x/interchainquery/keeper/abci_test.go b/x/interchainquery/keeper/abci_test.go index 90f311970..324142b98 100644 --- a/x/interchainquery/keeper/abci_test.go +++ b/x/interchainquery/keeper/abci_test.go @@ -19,7 +19,6 @@ func (suite *KeeperTestSuite) TestEndBlocker() { id := keeper.GenerateQueryHash(suite.path.EndpointB.ConnectionID, suite.chainB.ChainID, "cosmos.staking.v1beta1.Query/Validators", bz, "") query := suite.GetSimApp(suite.chainA).InterchainQueryKeeper.NewQuery( - suite.chainA.GetContext(), "", suite.path.EndpointB.ConnectionID, suite.chainB.ChainID, diff --git a/x/interchainquery/keeper/grpc_query_test.go b/x/interchainquery/keeper/grpc_query_test.go index d98a8eb25..9ad209843 100644 --- a/x/interchainquery/keeper/grpc_query_test.go +++ b/x/interchainquery/keeper/grpc_query_test.go @@ -13,7 +13,6 @@ func (suite *KeeperTestSuite) TestQueries() { suite.NoError(err) query := suite.GetSimApp(suite.chainA).InterchainQueryKeeper.NewQuery( - suite.chainA.GetContext(), "", suite.path.EndpointB.ConnectionID, suite.chainB.ChainID, diff --git a/x/interchainquery/keeper/keeper.go b/x/interchainquery/keeper/keeper.go index 0920681ca..1aa4ec8d9 100644 --- a/x/interchainquery/keeper/keeper.go +++ b/x/interchainquery/keeper/keeper.go @@ -140,7 +140,7 @@ func (k *Keeper) MakeRequest(ctx sdk.Context, connectionID string, chainID strin panic(err) } } - newQuery := k.NewQuery(ctx, module, connectionID, chainID, queryType, request, period, callbackID, ttl) + newQuery := k.NewQuery(module, connectionID, chainID, queryType, request, period, callbackID, ttl) k.SetQuery(ctx, *newQuery) } else { // a re-request of an existing query triggers resetting of height to trigger immediately. diff --git a/x/interchainquery/keeper/keeper_test.go b/x/interchainquery/keeper/keeper_test.go index a437e2943..5093af117 100644 --- a/x/interchainquery/keeper/keeper_test.go +++ b/x/interchainquery/keeper/keeper_test.go @@ -108,7 +108,6 @@ func (suite *KeeperTestSuite) TestSubmitQueryResponse() { { suite.GetSimApp(suite.chainA).InterchainQueryKeeper. NewQuery( - suite.chainA.GetContext(), "", suite.path.EndpointB.ConnectionID, suite.chainB.ChainID, @@ -124,7 +123,6 @@ func (suite *KeeperTestSuite) TestSubmitQueryResponse() { { suite.GetSimApp(suite.chainA).InterchainQueryKeeper. NewQuery( - suite.chainA.GetContext(), "", suite.path.EndpointB.ConnectionID, suite.chainB.ChainID, @@ -140,7 +138,6 @@ func (suite *KeeperTestSuite) TestSubmitQueryResponse() { { suite.GetSimApp(suite.chainA).InterchainQueryKeeper. NewQuery( - suite.chainA.GetContext(), "", suite.path.EndpointB.ConnectionID, suite.chainB.ChainID, @@ -156,7 +153,6 @@ func (suite *KeeperTestSuite) TestSubmitQueryResponse() { { suite.GetSimApp(suite.chainA).InterchainQueryKeeper. NewQuery( - suite.chainA.GetContext(), "", suite.path.EndpointB.ConnectionID, suite.chainB.ChainID, diff --git a/x/interchainquery/keeper/queries.go b/x/interchainquery/keeper/queries.go index c8a99b142..59638eaad 100644 --- a/x/interchainquery/keeper/queries.go +++ b/x/interchainquery/keeper/queries.go @@ -17,7 +17,7 @@ func GenerateQueryHash(connectionID string, chainID string, queryType string, re // ---------------------------------------------------------------- -func (k Keeper) NewQuery(ctx sdk.Context, module string, connectionID string, chainID string, queryType string, request []byte, period math.Int, callbackID string, ttl uint64) *types.Query { +func (k Keeper) NewQuery(module string, connectionID string, chainID string, queryType string, request []byte, period math.Int, callbackID string, ttl uint64) *types.Query { return &types.Query{Id: GenerateQueryHash(connectionID, chainID, queryType, request, module), ConnectionId: connectionID, ChainId: chainID, QueryType: queryType, Request: request, Period: period, LastHeight: sdk.ZeroInt(), CallbackId: callbackID, Ttl: ttl} } diff --git a/x/interchainquery/keeper/queries_test.go b/x/interchainquery/keeper/queries_test.go index 0a11b92c0..e2a582b23 100644 --- a/x/interchainquery/keeper/queries_test.go +++ b/x/interchainquery/keeper/queries_test.go @@ -13,7 +13,6 @@ func (suite *KeeperTestSuite) TestQuery() { suite.NoError(err) query := suite.GetSimApp(suite.chainA).InterchainQueryKeeper.NewQuery( - suite.chainA.GetContext(), "", suite.path.EndpointB.ConnectionID, suite.chainB.ChainID, diff --git a/x/interchainquery/module.go b/x/interchainquery/module.go index 980b64e5f..8e986a026 100644 --- a/x/interchainquery/module.go +++ b/x/interchainquery/module.go @@ -60,12 +60,12 @@ func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { } // DefaultGenesis returns the capability module's default genesis state. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { +func (AppModuleBasic) DefaultGenesis(_ codec.JSONCodec) json.RawMessage { return nil } // ValidateGenesis performs genesis state validation for the capability module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, _ client.TxEncodingConfig, _ json.RawMessage) error { return nil } @@ -112,14 +112,14 @@ func (am AppModule) Name() string { // Route returns the capability module's message routing key. func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) + return sdk.Route{} } // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } // LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return nil } @@ -150,7 +150,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // BeginBlock executes all ABCI BeginBlock logic respective to the capability module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { // am.keeper.BeginBlocker(ctx) } @@ -169,25 +169,25 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the pool-incentives module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) { +func (AppModule) GenerateGenesisState(_ *module.SimulationState) { // simulation.RandomizedGenState(simState) } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // RandomizedParams creates randomized pool-incentives param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { return nil } // RegisterStoreDecoder registers a decoder for supply module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { } // WeightedOperations returns the all the gov module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { +func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil // TODO } diff --git a/x/interchainstaking/handler.go b/x/interchainstaking/handler.go index 7910aa8ee..e391a9ac2 100644 --- a/x/interchainstaking/handler.go +++ b/x/interchainstaking/handler.go @@ -10,28 +10,6 @@ import ( "github.com/ingenuity-build/quicksilver/x/interchainstaking/types" ) -// NewHandler returns a handler for interchainstaking module messages -func NewHandler(k keeper.Keeper) sdk.Handler { - msgServer := keeper.NewMsgServerImpl(k) - - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - - switch msg := msg.(type) { - case *types.MsgRequestRedemption: - res, err := msgServer.RequestRedemption(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - - case *types.MsgSignalIntent: - res, err := msgServer.SignalIntent(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - - default: - return nil, sdkioerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized interchainstaking message type: %T", msg) - } - } -} - func NewProposalHandler(k keeper.Keeper) govv1beta1.Handler { return func(ctx sdk.Context, content govv1beta1.Content) error { switch c := content.(type) { diff --git a/x/interchainstaking/ibc_module.go b/x/interchainstaking/ibc_module.go index 77d47584b..64d6fecdd 100644 --- a/x/interchainstaking/ibc_module.go +++ b/x/interchainstaking/ibc_module.go @@ -35,27 +35,27 @@ func NewIBCModule(k keeper.Keeper) IBCModule { // OnChanOpenInit implements the IBCModule interface func (im IBCModule) OnChanOpenInit( ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, + _ channeltypes.Order, + _ []string, portID string, channelID string, chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version string, + _ channeltypes.Counterparty, + _ string, ) (string, error) { return "", im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) } // OnChanOpenTry implements the IBCModule interface func (im IBCModule) OnChanOpenTry( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - counterpartyVersion string, + _ sdk.Context, + _ channeltypes.Order, + _ []string, + _ string, + _ string, + _ *capabilitytypes.Capability, + _ channeltypes.Counterparty, + _ string, ) (string, error) { return "", nil } @@ -65,8 +65,8 @@ func (im IBCModule) OnChanOpenAck( ctx sdk.Context, portID, channelID string, - counterPartyChannelID string, - counterpartyVersion string, + _ string, + _ string, ) error { // get connection from port connectionID, _, err := im.keeper.IBCKeeper.ChannelKeeper.GetChannelConnection(ctx, portID, channelID) @@ -78,27 +78,27 @@ func (im IBCModule) OnChanOpenAck( // OnChanOpenConfirm implements the IBCModule interface func (im IBCModule) OnChanOpenConfirm( - ctx sdk.Context, - portID, - channelID string, + _ sdk.Context, + _, + _ string, ) error { return nil } // OnChanCloseInit implements the IBCModule interface func (im IBCModule) OnChanCloseInit( - ctx sdk.Context, - portID, - channelID string, + _ sdk.Context, + _, + _ string, ) error { return nil } // OnChanCloseConfirm implements the IBCModule interface func (im IBCModule) OnChanCloseConfirm( - ctx sdk.Context, - portID, - channelID string, + _ sdk.Context, + _, + _ string, ) error { return nil } @@ -107,9 +107,9 @@ func (im IBCModule) OnChanCloseConfirm( // is returned if the packet data is successfully decoded and the receive application // logic returns without error. func (im IBCModule) OnRecvPacket( - ctx sdk.Context, - packet channeltypes.Packet, - relayer sdk.AccAddress, + _ sdk.Context, + _ channeltypes.Packet, + _ sdk.AccAddress, ) ibcexported.Acknowledgement { return channeltypes.NewErrorAcknowledgement(errors.New("cannot receive packet via interchain accounts authentication module")) } @@ -119,7 +119,7 @@ func (im IBCModule) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, - relayer sdk.AccAddress, + _ sdk.AccAddress, ) error { connectionID, _, err := im.keeper.IBCKeeper.ChannelKeeper.GetChannelConnection(ctx, packet.SourcePort, packet.SourceChannel) if err != nil { @@ -140,19 +140,19 @@ func (im IBCModule) OnAcknowledgementPacket( func (im IBCModule) OnTimeoutPacket( ctx sdk.Context, packet channeltypes.Packet, - relayer sdk.AccAddress, + _ sdk.AccAddress, ) error { return im.keeper.HandleTimeout(ctx, packet) } // NegotiateAppVersion implements the IBCModule interface func (im IBCModule) NegotiateAppVersion( - ctx sdk.Context, - order channeltypes.Order, - connectionID string, - portID string, - counterparty channeltypes.Counterparty, - proposedVersion string, + _ sdk.Context, + _ channeltypes.Order, + _ string, + _ string, + _ channeltypes.Counterparty, + _ string, ) (string, error) { return "", nil } diff --git a/x/interchainstaking/keeper/callbacks.go b/x/interchainstaking/keeper/callbacks.go index a7ea91c1b..d2dc9babe 100644 --- a/x/interchainstaking/keeper/callbacks.go +++ b/x/interchainstaking/keeper/callbacks.go @@ -198,7 +198,7 @@ func PerfBalanceCallback(k *Keeper, ctx sdk.Context, response []byte, query icqt } // initialize performance delegations - if err := k.UpdatePerformanceDelegations(ctx, zone, response); err != nil { + if err := k.UpdatePerformanceDelegations(ctx, zone); err != nil { k.Logger(ctx).Info(err.Error()) return err } diff --git a/x/interchainstaking/keeper/delegation.go b/x/interchainstaking/keeper/delegation.go index 29cd6eeaf..a37e48bb6 100644 --- a/x/interchainstaking/keeper/delegation.go +++ b/x/interchainstaking/keeper/delegation.go @@ -179,7 +179,7 @@ func (k *Keeper) IterateDelegatorDelegations(ctx sdk.Context, zone *types.Zone, } } -func (k *Keeper) PrepareDelegationMessagesForCoins(ctx sdk.Context, zone *types.Zone, allocations map[string]sdkmath.Int) []sdk.Msg { +func (k *Keeper) PrepareDelegationMessagesForCoins(zone *types.Zone, allocations map[string]sdkmath.Int) []sdk.Msg { var msgs []sdk.Msg for _, valoper := range utils.Keys(allocations) { if !allocations[valoper].IsZero() { @@ -189,7 +189,7 @@ func (k *Keeper) PrepareDelegationMessagesForCoins(ctx sdk.Context, zone *types. return msgs } -func (k *Keeper) PrepareDelegationMessagesForShares(ctx sdk.Context, zone *types.Zone, coins sdk.Coins) []sdk.Msg { +func (k *Keeper) PrepareDelegationMessagesForShares(zone *types.Zone, coins sdk.Coins) []sdk.Msg { var msgs []sdk.Msg for _, coin := range coins.Sort() { if !coin.IsZero() { diff --git a/x/interchainstaking/keeper/ibc_channel_handlers.go b/x/interchainstaking/keeper/ibc_channel_handlers.go index 8a5fa85fa..6fa605366 100644 --- a/x/interchainstaking/keeper/ibc_channel_handlers.go +++ b/x/interchainstaking/keeper/ibc_channel_handlers.go @@ -46,7 +46,7 @@ func (k *Keeper) HandleChannelOpenAck(ctx sdk.Context, portID string, connection case len(portParts) == 2 && portParts[1] == types.ICASuffixDeposit: if zone.DepositAddress == nil { - zone.DepositAddress, err = types.NewICAAccount(address, portID, zone.BaseDenom) + zone.DepositAddress, err = types.NewICAAccount(address, portID) if err != nil { return err } @@ -73,7 +73,7 @@ func (k *Keeper) HandleChannelOpenAck(ctx sdk.Context, portID string, connection // withdrawal address case len(portParts) == 2 && portParts[1] == types.ICASuffixWithdrawal: if zone.WithdrawalAddress == nil { - zone.WithdrawalAddress, err = types.NewICAAccount(address, portID, zone.BaseDenom) + zone.WithdrawalAddress, err = types.NewICAAccount(address, portID) if err != nil { return err } @@ -82,7 +82,7 @@ func (k *Keeper) HandleChannelOpenAck(ctx sdk.Context, portID string, connection // delegation addresses case len(portParts) == 2 && portParts[1] == types.ICASuffixDelegate: if zone.DelegationAddress == nil { - zone.DelegationAddress, err = types.NewICAAccount(address, portID, zone.BaseDenom) + zone.DelegationAddress, err = types.NewICAAccount(address, portID) if err != nil { return err } @@ -92,7 +92,7 @@ func (k *Keeper) HandleChannelOpenAck(ctx sdk.Context, portID string, connection case len(portParts) == 2 && portParts[1] == types.ICASuffixPerformance: if zone.PerformanceAddress == nil { ctx.Logger().Info("create performance account") - zone.PerformanceAddress, err = types.NewICAAccount(address, portID, zone.BaseDenom) + zone.PerformanceAddress, err = types.NewICAAccount(address, portID) if err != nil { return err } diff --git a/x/interchainstaking/keeper/ibc_packet_handlers.go b/x/interchainstaking/keeper/ibc_packet_handlers.go index ae287ba5b..8ed9a7594 100644 --- a/x/interchainstaking/keeper/ibc_packet_handlers.go +++ b/x/interchainstaking/keeper/ibc_packet_handlers.go @@ -336,7 +336,7 @@ func (k *Keeper) HandleAcknowledgement(ctx sdk.Context, packet channeltypes.Pack return nil } -func (k *Keeper) HandleTimeout(ctx sdk.Context, packet channeltypes.Packet) error { +func (k *Keeper) HandleTimeout(_ sdk.Context, _ channeltypes.Packet) error { return nil } @@ -411,9 +411,9 @@ func (k *Keeper) handleSendToDelegate(ctx sdk.Context, zone *types.Zone, msg *ba for _, coin := range msg.Amount { if coin.Denom == zone.BaseDenom { allocations := k.DeterminePlanForDelegation(ctx, zone, msg.Amount) - msgs = append(msgs, k.PrepareDelegationMessagesForCoins(ctx, zone, allocations)...) + msgs = append(msgs, k.PrepareDelegationMessagesForCoins(zone, allocations)...) } else { - msgs = append(msgs, k.PrepareDelegationMessagesForShares(ctx, zone, msg.Amount)...) + msgs = append(msgs, k.PrepareDelegationMessagesForShares(zone, msg.Amount)...) } } @@ -475,7 +475,7 @@ func (k *Keeper) HandleWithdrawForUser(ctx sdk.Context, zone *types.Zone, msg *b newDist := make([]*types.Distribution, 0) i := 0 for idx := range withdrawalRecord.Distribution { - if _, delete := dlist[idx]; !delete { + if _, remove := dlist[idx]; !remove { newDist = append(newDist, withdrawalRecord.Distribution[idx]) } i++ @@ -839,7 +839,7 @@ func (k *Keeper) HandleUpdatedWithdrawAddress(ctx sdk.Context, msg sdk.Msg) erro } // TODO: this should be part of Keeper, but part of zone. Refactor me. -func (k *Keeper) GetValidatorForToken(ctx sdk.Context, delegatorAddress string, amount sdk.Coin) (string, error) { +func (k *Keeper) GetValidatorForToken(ctx sdk.Context, _ string, amount sdk.Coin) (string, error) { zone, err := k.GetZoneFromContext(ctx) if err != nil { err = fmt.Errorf("3: %w", err) diff --git a/x/interchainstaking/keeper/keeper.go b/x/interchainstaking/keeper/keeper.go index e70a898a1..58c91b2c8 100644 --- a/x/interchainstaking/keeper/keeper.go +++ b/x/interchainstaking/keeper/keeper.go @@ -91,7 +91,7 @@ func NewKeeper( } } -func (k *Keeper) GetGovAuthority(ctx sdk.Context) string { +func (k *Keeper) GetGovAuthority(_ sdk.Context) string { return sdk.MustBech32ifyAddressBytes(config.Bech32Prefix, k.AccountKeeper.GetModuleAddress(govtypes.ModuleName)) } diff --git a/x/interchainstaking/keeper/msg_server.go b/x/interchainstaking/keeper/msg_server.go index 50a3f201c..a5fad2434 100644 --- a/x/interchainstaking/keeper/msg_server.go +++ b/x/interchainstaking/keeper/msg_server.go @@ -209,12 +209,12 @@ func (k msgServer) GovCloseChannel(goCtx context.Context, msg *types.MsgGovClose ) } - _, cap, err := k.Keeper.IBCKeeper.ChannelKeeper.LookupModuleByChannel(ctx, msg.PortId, msg.ChannelId) + _, capability, err := k.Keeper.IBCKeeper.ChannelKeeper.LookupModuleByChannel(ctx, msg.PortId, msg.ChannelId) if err != nil { return &types.MsgGovCloseChannelResponse{}, err } - if err := k.IBCKeeper.ChannelKeeper.ChanCloseInit(ctx, msg.PortId, msg.ChannelId, cap); err != nil { + if err := k.IBCKeeper.ChannelKeeper.ChanCloseInit(ctx, msg.PortId, msg.ChannelId, capability); err != nil { return &types.MsgGovCloseChannelResponse{}, err } diff --git a/x/interchainstaking/keeper/receipt.go b/x/interchainstaking/keeper/receipt.go index 10432c232..1e7cd8a55 100644 --- a/x/interchainstaking/keeper/receipt.go +++ b/x/interchainstaking/keeper/receipt.go @@ -70,8 +70,8 @@ func (k *Keeper) HandleReceiptForTransaction(ctx sdk.Context, txr *sdk.TxRespons } var senderAccAddress sdk.AccAddress = addressBytes - if err := zone.ValidateCoinsForZone(ctx, assets); err != nil { - // we expect this to trigger if the valset has changed recently (i.e. we haven't seen the validator before. + if err := zone.ValidateCoinsForZone(assets); err != nil { + // we expect this to trigger if the validatorset has changed recently (i.e. we haven't seen the validator before. // That is okay, we'll catch it next round!) k.Logger(ctx).Error("unable to validate coins. Ignoring.", "senderAddress", senderAddress) return fmt.Errorf("unable to validate coins. Ignoring. senderAddress=%q", senderAddress) @@ -84,9 +84,8 @@ func (k *Keeper) HandleReceiptForTransaction(ctx sdk.Context, txr *sdk.TxRespons k.Logger(ctx).Error("unable to update intent. Ignoring.", "senderAddress", senderAddress, "zone", zone.ChainId, "err", err.Error()) return fmt.Errorf("unable to update intent. Ignoring. senderAddress=%q zone=%q err: %w", senderAddress, zone.ChainId, err) } - if err := k.MintQAsset(ctx, senderAccAddress, senderAddress, zone, assets); err != nil { - k.Logger(ctx).Error("unable to mint QAsset. Ignoring.", "senderAddress", senderAddress, "zone", zone.ChainId, "err", err.Error()) + k.Logger(ctx).Error("unable to mint QAsset. Ignoring.", "senderAddress", senderAddress, "zone", zone.ChainId, "err", err) return fmt.Errorf("unable to mint QAsset. Ignoring. senderAddress=%q zone=%q err: %w", senderAddress, zone.ChainId, err) } diff --git a/x/interchainstaking/keeper/redemptions.go b/x/interchainstaking/keeper/redemptions.go index 5af5b07d6..420f43ae0 100644 --- a/x/interchainstaking/keeper/redemptions.go +++ b/x/interchainstaking/keeper/redemptions.go @@ -177,21 +177,24 @@ WITHDRAWAL: } txCoinMap[hash] = sdk.NewCoin(txCoinMap[hash].Denom, sdk.ZeroInt()) continue WITHDRAWAL - } else { - txDistrsMap[hash] = append(txDistrsMap[hash], &types.Distribution{Valoper: v, Amount: allocationsMap[v].Uint64()}) - txCoinMap[hash] = sdk.NewCoin(txCoinMap[hash].Denom, txCoinMap[hash].Amount.Sub(allocationsMap[v])) - existing, found := valOutCoinsMap[v] - if !found { - valOutCoinsMap[v] = sdk.NewCoin(zone.BaseDenom, allocationsMap[v]) - txHashes[v] = []string{hash} + } - } else { - valOutCoinsMap[v] = existing.Add(sdk.NewCoin(zone.BaseDenom, allocationsMap[v])) - txHashes[v] = append(txHashes[v], hash) - } - allocationsMap[v] = sdk.ZeroInt() + txDistrsMap[hash] = append(txDistrsMap[hash], &types.Distribution{Valoper: v, Amount: allocationsMap[v].Uint64()}) + txCoinMap[hash] = sdk.NewCoin(txCoinMap[hash].Denom, txCoinMap[hash].Amount.Sub(allocationsMap[v])) + existing, found := valOutCoinsMap[v] + if !found { + valOutCoinsMap[v] = sdk.NewCoin(zone.BaseDenom, allocationsMap[v]) + txHashes[v] = []string{hash} + + } else { + valOutCoinsMap[v] = existing.Add(sdk.NewCoin(zone.BaseDenom, allocationsMap[v])) + txHashes[v] = append(txHashes[v], hash) } + + allocationsMap[v] = sdk.ZeroInt() if allocationsMap[v].IsZero() { + fmt.Println("valopers len", len(valopers)) + fmt.Println("vidx+1", vidx+1) if len(valopers) > vidx+1 { vidx++ v = valopers[vidx] diff --git a/x/interchainstaking/keeper/zones.go b/x/interchainstaking/keeper/zones.go index 369f1f43b..b51fc3056 100644 --- a/x/interchainstaking/keeper/zones.go +++ b/x/interchainstaking/keeper/zones.go @@ -158,10 +158,7 @@ func (k *Keeper) EnsureICAsActive(ctx sdk.Context, zone *types.Zone) error { if err := k.EnsureICAActive(ctx, zone, zone.PerformanceAddress); err != nil { return err } - if err := k.EnsureICAActive(ctx, zone, zone.WithdrawalAddress); err != nil { - return err - } - return nil + return k.EnsureICAActive(ctx, zone, zone.WithdrawalAddress) } func (k *Keeper) EnsureICAActive(ctx sdk.Context, zone *types.Zone, account *types.ICAAccount) error { @@ -341,7 +338,7 @@ func (k *Keeper) SetAccountBalance(ctx sdk.Context, zone types.Zone, address str return nil } -func (k *Keeper) UpdatePerformanceDelegations(ctx sdk.Context, zone types.Zone, response []byte) error { +func (k *Keeper) UpdatePerformanceDelegations(ctx sdk.Context, zone types.Zone) error { k.Logger(ctx).Info("Initialize performance delegations") delegations := k.GetAllPerformanceDelegations(ctx, &zone) diff --git a/x/interchainstaking/module.go b/x/interchainstaking/module.go index cd8f50b50..71ea9d543 100644 --- a/x/interchainstaking/module.go +++ b/x/interchainstaking/module.go @@ -70,7 +70,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the capability module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -79,7 +79,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod } // RegisterRESTRoutes registers the capability module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} +func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. // This function will panic on failure. @@ -125,14 +125,14 @@ func (am AppModule) Name() string { // Route returns the capability module's message routing key. func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) + return sdk.Route{} } // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } // LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return nil } @@ -173,7 +173,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { // EndBlock executes all ABCI EndBlock logic respective to the capability module. It // returns no validator updates. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -185,25 +185,25 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the pool-incentives module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) { +func (AppModule) GenerateGenesisState(_ *module.SimulationState) { // simulation.RandomizedGenState(simState) } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // RandomizedParams creates randomized pool-incentives param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { return nil } // RegisterStoreDecoder registers a decoder for supply module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { } // WeightedOperations returns the all the gov module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { +func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil // TODO } diff --git a/x/interchainstaking/types/accounts.go b/x/interchainstaking/types/accounts.go index 26cd31b7b..089783b04 100644 --- a/x/interchainstaking/types/accounts.go +++ b/x/interchainstaking/types/accounts.go @@ -8,7 +8,7 @@ import ( "github.com/ingenuity-build/quicksilver/utils" ) -func NewICAAccount(addr string, portID string, baseDenom string) (*ICAAccount, error) { +func NewICAAccount(addr string, portID string) (*ICAAccount, error) { if _, err := utils.AccAddressFromBech32(addr, ""); err != nil { return nil, err } diff --git a/x/interchainstaking/types/accounts_test.go b/x/interchainstaking/types/accounts_test.go index 415cca1b4..ad93579e9 100644 --- a/x/interchainstaking/types/accounts_test.go +++ b/x/interchainstaking/types/accounts_test.go @@ -13,7 +13,7 @@ import ( func NewICA() *types.ICAAccount { addr := []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19} accAddr := sdk.AccAddress(addr) - ica, err := types.NewICAAccount(accAddr.String(), "mercury-1.deposit", "uqck") + ica, err := types.NewICAAccount(accAddr.String(), "mercury-1.deposit") if err != nil { panic("failed to create ICA") } @@ -21,7 +21,7 @@ func NewICA() *types.ICAAccount { } func TestNewICAAccountBadAddr(t *testing.T) { - ica, err := types.NewICAAccount("cosmos1ssrxxe4xsls57ehrkswlkhlk", "mercury-1.deposit", "qck") + ica, err := types.NewICAAccount("cosmos1ssrxxe4xsls57ehrkswlkhlk", "mercury-1.deposit") require.Nil(t, ica, "expecting a nil ICAAccount") require.NotNil(t, err, "expecting a non-nil error") require.Contains(t, err.Error(), "invalid checksum") diff --git a/x/interchainstaking/types/rebalance.go b/x/interchainstaking/types/rebalance.go index a9dc666fe..b11b6875e 100644 --- a/x/interchainstaking/types/rebalance.go +++ b/x/interchainstaking/types/rebalance.go @@ -160,14 +160,13 @@ func DetermineAllocationsForRebalancing( amount = src.Weight.Abs().TruncateInt() } - if tgt.Weight.Abs().TruncateInt().IsZero() { //nolint:gocritic + if tgt.Weight.Abs().TruncateInt().IsZero() { tgtIdx++ continue - } else if tgt.Weight.Abs().TruncateInt().GT(toRebalance) { - // amount == amount! - } else { + } else if tgt.Weight.Abs().TruncateInt().LTE(toRebalance) { amount = sdk.MinInt(amount, tgt.Weight.Abs().TruncateInt()) } + out = append(out, RebalanceTarget{Amount: amount, Target: tgt.ValoperAddress, Source: src.ValoperAddress}) deltas[srcIdx].Weight = src.Weight.Add(sdk.NewDecFromInt(amount)) deltas[tgtIdx].Weight = tgt.Weight.Sub(sdk.NewDecFromInt(amount)) diff --git a/x/interchainstaking/types/redemptions.go b/x/interchainstaking/types/redemptions.go index 255c44a9c..0d59247d1 100644 --- a/x/interchainstaking/types/redemptions.go +++ b/x/interchainstaking/types/redemptions.go @@ -116,9 +116,7 @@ func DetermineAllocationsForUndelegation(currentAllocations map[string]math.Int, // which should be the biggest source. This will always be a small amount, and will count toward the delta calculations on the next run. dust := amount[0].Amount.Sub(outSum) for idx := len(deltas) - 1; idx >= 0; idx-- { - if dust.GT(availablePerValidator[deltas[idx].ValoperAddress]) { - continue - } else { + if dust.LTE(availablePerValidator[deltas[idx].ValoperAddress]) { outWeights[deltas[idx].ValoperAddress] = outWeights[deltas[idx].ValoperAddress].Add(dust) break } diff --git a/x/interchainstaking/types/zones.go b/x/interchainstaking/types/zones.go index 7ee352356..72405693a 100644 --- a/x/interchainstaking/types/zones.go +++ b/x/interchainstaking/types/zones.go @@ -36,7 +36,7 @@ func (z *Zone) GetDelegationAccount() (*ICAAccount, error) { return z.DelegationAddress, nil } -func (z *Zone) ValidateCoinsForZone(ctx sdk.Context, coins sdk.Coins) error { +func (z *Zone) ValidateCoinsForZone(coins sdk.Coins) error { zoneVals := z.GetValidatorsAddressesAsSlice() COINS: diff --git a/x/interchainstaking/types/zones_test.go b/x/interchainstaking/types/zones_test.go index ad7151be6..c184ba000 100644 --- a/x/interchainstaking/types/zones_test.go +++ b/x/interchainstaking/types/zones_test.go @@ -62,8 +62,8 @@ func TestValidateCoinsForZone(t *testing.T) { zone.Validators = append(zone.Validators, &types.Validator{ValoperAddress: "cosmosvaloper1a3yjj7d3qnx4spgvjcwjq9cw9snrrrhu5h6jll", CommissionRate: sdk.MustNewDecFromStr("0.2"), VotingPower: sdk.NewInt(2000), Status: stakingtypes.BondStatusBonded}) zone.Validators = append(zone.Validators, &types.Validator{ValoperAddress: "cosmosvaloper1z8zjv3lntpwxua0rtpvgrcwl0nm0tltgpgs6l7", CommissionRate: sdk.MustNewDecFromStr("0.2"), VotingPower: sdk.NewInt(2000), Status: stakingtypes.BondStatusBonded}) - require.NoError(t, zone.ValidateCoinsForZone(sdk.Context{}, sdk.NewCoins(sdk.NewCoin("cosmosvaloper14lultfckehtszvzw4ehu0apvsr77afvyju5zzy1", sdk.OneInt())))) - require.Errorf(t, zone.ValidateCoinsForZone(sdk.Context{}, sdk.NewCoins(sdk.NewCoin("cosmosvaloper18ldc09yx4aua9g8mkl3sj526hgydzzyehcyjjr1", sdk.OneInt()))), "invalid denom for zone: cosmosvaloper18ldc09yx4aua9g8mkl3sj526hgydzzyehcyjjr1") + require.NoError(t, zone.ValidateCoinsForZone(sdk.NewCoins(sdk.NewCoin("cosmosvaloper14lultfckehtszvzw4ehu0apvsr77afvyju5zzy1", sdk.OneInt())))) + require.Errorf(t, zone.ValidateCoinsForZone(sdk.NewCoins(sdk.NewCoin("cosmosvaloper18ldc09yx4aua9g8mkl3sj526hgydzzyehcyjjr1", sdk.OneInt()))), "invalid denom for zone: cosmosvaloper18ldc09yx4aua9g8mkl3sj526hgydzzyehcyjjr1") } func TestDefaultIntent(t *testing.T) { diff --git a/x/mint/genesis.go b/x/mint/genesis.go index 39d4178cf..70cc972a9 100644 --- a/x/mint/genesis.go +++ b/x/mint/genesis.go @@ -8,7 +8,7 @@ import ( ) // InitGenesis new mint genesis. -func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, data *types.GenesisState) { +func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, ak types.AccountKeeper, data *types.GenesisState) { data.Minter.EpochProvisions = data.Params.GenesisEpochProvisions keeper.SetMinter(ctx, data.Minter) keeper.SetParams(ctx, data.Params) diff --git a/x/mint/keeper/hooks.go b/x/mint/keeper/hooks.go index a538190c8..5c95644f8 100644 --- a/x/mint/keeper/hooks.go +++ b/x/mint/keeper/hooks.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error { +func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64) error { return nil } diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index a36210c9f..8bbdb3c21 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -141,7 +141,7 @@ func (k Keeper) MintCoins(ctx sdk.Context, newCoins sdk.Coins) error { } // GetProportions gets the balance of the `MintedDenom` from minted coins and returns coins according to the `AllocationRatio`. -func (k Keeper) GetProportions(ctx sdk.Context, mintedCoin sdk.Coin, ratio sdk.Dec) sdk.Coin { +func (k Keeper) GetProportions(mintedCoin sdk.Coin, ratio sdk.Dec) sdk.Coin { return sdk.NewCoin(mintedCoin.Denom, sdk.NewDecFromInt(mintedCoin.Amount).Mul(ratio).TruncateInt()) } @@ -151,14 +151,14 @@ func (k Keeper) DistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin) error proportions := params.DistributionProportions // allocate staking incentives into fee collector account to be moved to on next begin blocker by staking module - stakingIncentivesCoins := sdk.NewCoins(k.GetProportions(ctx, mintedCoin, proportions.Staking)) + stakingIncentivesCoins := sdk.NewCoins(k.GetProportions(mintedCoin, proportions.Staking)) err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, k.feeCollectorName, stakingIncentivesCoins) if err != nil { return err } - // allocate pool allocation ratio to pool-incentives module account account - poolIncentivesCoins := sdk.NewCoins(k.GetProportions(ctx, mintedCoin, proportions.PoolIncentives)) + // allocate pool allocation ratio to pool-incentives module account + poolIncentivesCoins := sdk.NewCoins(k.GetProportions(mintedCoin, proportions.PoolIncentives)) // temporary until we have incentives pool sorted :) err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, airdroptypes.ModuleName, poolIncentivesCoins) @@ -166,7 +166,7 @@ func (k Keeper) DistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin) error return err } - participationRewardCoin := k.GetProportions(ctx, mintedCoin, proportions.ParticipationRewards) + participationRewardCoin := k.GetProportions(mintedCoin, proportions.ParticipationRewards) participationRewardCoins := sdk.NewCoins(participationRewardCoin) participationRewardsAddress := k.accountKeeper.GetModuleAddress(participationrewards.ModuleName) k.Logger(ctx).Info("participation rewards", "Proportion", proportions.ParticipationRewards, "Coins", participationRewardCoins, "Address", participationRewardsAddress) diff --git a/x/mint/module.go b/x/mint/module.go index 6d92b0c0e..c61d4c94d 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -39,7 +39,7 @@ func (AppModuleBasic) Name() string { } // RegisterLegacyAminoCodec registers the mint module's types on the given LegacyAmino codec. -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} +func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {} // RegisterInterfaces registers the module's interface types. func (b AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry) {} @@ -51,7 +51,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the mint module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var gs types.GenesisState if err := cdc.UnmarshalJSON(bz, &gs); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -113,7 +113,7 @@ func (AppModule) QuerierRoute() string { } // LegacyQuerierHandler returns the x/mint module's sdk.Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return func(sdk.Context, []string, abci.RequestQuery) ([]byte, error) { return nil, fmt.Errorf("legacy querier not supported for the x/%s module", types.ModuleName) } @@ -131,7 +131,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - InitGenesis(ctx, am.keeper, am.authKeeper, am.bankKeeper, &genesisState) + InitGenesis(ctx, am.keeper, am.authKeeper, &genesisState) return []abci.ValidatorUpdate{} } @@ -143,7 +143,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // BeginBlock returns the begin blocker for the mint module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { } // EndBlock returns the end blocker for the mint module. It returns no validator @@ -165,12 +165,12 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // RandomizedParams creates randomized mint param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { return nil } diff --git a/x/mint/types/params.go b/x/mint/types/params.go index 1e6873ee9..00ccc6d0f 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -62,7 +62,7 @@ func DefaultParams() Params { ) } -// validate params. +// Validate validates params. func (p Params) Validate() error { if err := validateMintDenom(p.MintDenom); err != nil { return err @@ -82,11 +82,7 @@ func (p Params) Validate() error { if err := validateDistributionProportions(p.DistributionProportions); err != nil { return err } - if err := validateMintingRewardsDistributionStartEpoch(p.MintingRewardsDistributionStartEpoch); err != nil { - return err - } - - return nil + return validateMintingRewardsDistributionStartEpoch(p.MintingRewardsDistributionStartEpoch) } // String implements the Stringer interface. @@ -117,11 +113,7 @@ func validateMintDenom(i interface{}) error { if strings.TrimSpace(v) == "" { return errors.New("mint denom cannot be blank") } - if err := sdk.ValidateDenom(v); err != nil { - return err - } - - return nil + return sdk.ValidateDenom(v) } func validateGenesisEpochProvisions(i interface{}) error { diff --git a/x/participationrewards/handler.go b/x/participationrewards/handler.go index 52ef884be..0bab6dd3b 100644 --- a/x/participationrewards/handler.go +++ b/x/participationrewards/handler.go @@ -10,24 +10,6 @@ import ( "github.com/ingenuity-build/quicksilver/x/participationrewards/types" ) -// NewHandler returns a handler for participationrewards module messages -func NewHandler(k keeper.Keeper) sdk.Handler { - msgServer := keeper.NewMsgServerImpl(k) - - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - - switch msg := msg.(type) { - case *types.MsgSubmitClaim: - res, err := msgServer.SubmitClaim(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - - default: - return nil, sdkioerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized participationrewards message type: %T", msg) - } - } -} - func NewProposalHandler(k keeper.Keeper) govv1beta1.Handler { return func(ctx sdk.Context, content govv1beta1.Content) error { switch c := content.(type) { diff --git a/x/participationrewards/keeper/abci.go b/x/participationrewards/keeper/abci.go index 36f798b36..f41ee7b8b 100644 --- a/x/participationrewards/keeper/abci.go +++ b/x/participationrewards/keeper/abci.go @@ -5,5 +5,5 @@ import ( ) // BeginBlocker of participationrewards module -func (k Keeper) BeginBlocker(ctx sdk.Context) { +func (k Keeper) BeginBlocker(_ sdk.Context) { } diff --git a/x/participationrewards/keeper/distribution.go b/x/participationrewards/keeper/distribution.go index 3430e8550..9e842e5c9 100644 --- a/x/participationrewards/keeper/distribution.go +++ b/x/participationrewards/keeper/distribution.go @@ -153,11 +153,7 @@ func (k Keeper) allocateZoneRewards(ctx sdk.Context, tvs tokenValues, allocation k.allocateValidatorSelectionRewards(ctx) - if err := k.allocateHoldingsRewards(ctx); err != nil { - return err - } - - return nil + return k.allocateHoldingsRewards(ctx) } // setZoneAllocations returns the proportional zone rewards allocations as a diff --git a/x/participationrewards/keeper/hooks.go b/x/participationrewards/keeper/hooks.go index 37717190d..7ed2b8ae3 100644 --- a/x/participationrewards/keeper/hooks.go +++ b/x/participationrewards/keeper/hooks.go @@ -10,7 +10,7 @@ import ( var epochsDeferred = int64(3) -func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error { +func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64) error { return nil } diff --git a/x/participationrewards/keeper/keeper_test.go b/x/participationrewards/keeper/keeper_test.go index 292f41fce..0fdb6dfcf 100644 --- a/x/participationrewards/keeper/keeper_test.go +++ b/x/participationrewards/keeper/keeper_test.go @@ -185,7 +185,7 @@ func (suite *KeeperTestSuite) setupTestZones() { // self zone performanceAddressOsmo := utils.GenerateAccAddressForTestWithPrefix("osmo") - performanceAccountOsmo, err := icstypes.NewICAAccount(performanceAddressOsmo, "self", "uosmo") + performanceAccountOsmo, err := icstypes.NewICAAccount(performanceAddressOsmo, "self") suite.Require().NoError(err) performanceAccountOsmo.WithdrawalAddress = utils.GenerateAccAddressForTestWithPrefix("osmo") @@ -229,7 +229,7 @@ func (suite *KeeperTestSuite) setupTestZones() { // cosmos zone performanceAddressCosmos := utils.GenerateAccAddressForTestWithPrefix("cosmos") - performanceAccountCosmos, err := icstypes.NewICAAccount(performanceAddressCosmos, "cosmoshub-4.performance", "uatom") + performanceAccountCosmos, err := icstypes.NewICAAccount(performanceAddressCosmos, "cosmoshub-4.performance") suite.Require().NoError(err) performanceAccountCosmos.WithdrawalAddress = utils.GenerateAccAddressForTestWithPrefix("cosmos") diff --git a/x/participationrewards/keeper/msg_server.go b/x/participationrewards/keeper/msg_server.go index a8ad634ee..87a0cff8a 100644 --- a/x/participationrewards/keeper/msg_server.go +++ b/x/participationrewards/keeper/msg_server.go @@ -97,7 +97,7 @@ func (k msgServer) SubmitClaim(goCtx context.Context, msg *types.MsgSubmitClaim) if err != nil { return nil, fmt.Errorf("claim validation failed: %v", err) } - claim := k.icsKeeper.ClaimsManagerKeeper.NewClaim(ctx, msg.UserAddress, zone.ChainId, msg.ClaimType, msg.SrcZone, amount) + claim := k.icsKeeper.ClaimsManagerKeeper.NewClaim(msg.UserAddress, zone.ChainId, msg.ClaimType, msg.SrcZone, amount) k.icsKeeper.ClaimsManagerKeeper.SetClaim(ctx, &claim) } diff --git a/x/participationrewards/keeper/protocol_data.go b/x/participationrewards/keeper/protocol_data.go index 961f19a63..ebbe3dd26 100644 --- a/x/participationrewards/keeper/protocol_data.go +++ b/x/participationrewards/keeper/protocol_data.go @@ -45,12 +45,12 @@ func (k Keeper) SetProtocolData(ctx sdk.Context, key string, data *types.Protoco } // DeleteProtocolData delete protocol data info -func (k Keeper) DeleteProtocolData(ctx sdk.Context, key string, protocol string) { +func (k Keeper) DeleteProtocolData(ctx sdk.Context, key string) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixProtocolData) store.Delete([]byte(key)) } -// IteratePrefixedProtocolDatas iterate through protocol datas with the given prefix and perform the provided function +// IteratePrefixedProtocolDatas iterate through protocol data with the given prefix and perform the provided function func (k Keeper) IteratePrefixedProtocolDatas(ctx sdk.Context, key []byte, fn func(index int64, data types.ProtocolData) (stop bool)) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixProtocolData) iterator := sdk.KVStorePrefixIterator(store, key) diff --git a/x/participationrewards/keeper/submodule_liquid.go b/x/participationrewards/keeper/submodule_liquid.go index cf13f34da..e071c8f22 100644 --- a/x/participationrewards/keeper/submodule_liquid.go +++ b/x/participationrewards/keeper/submodule_liquid.go @@ -16,7 +16,7 @@ type LiquidTokensModule struct{} var _ Submodule = &LiquidTokensModule{} -func (m *LiquidTokensModule) Hooks(ctx sdk.Context, k Keeper) { +func (m *LiquidTokensModule) Hooks(_ sdk.Context, _ Keeper) { } func (m *LiquidTokensModule) IsActive() bool { diff --git a/x/participationrewards/module.go b/x/participationrewards/module.go index 411cdc033..dc968065e 100644 --- a/x/participationrewards/module.go +++ b/x/participationrewards/module.go @@ -59,7 +59,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the participationrewards module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var gs types.GenesisState if err := cdc.UnmarshalJSON(bz, &gs); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -111,7 +111,7 @@ func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // Route returns the message routing key for the participationrewards module. func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) + return sdk.Route{} } // QuerierRoute returns the participationrewards module's querier route name. @@ -120,7 +120,7 @@ func (AppModule) QuerierRoute() string { } // LegacyQuerierHandler returns the x/participationrewards module's sdk.Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return func(sdk.Context, []string, abci.RequestQuery) ([]byte, error) { return nil, fmt.Errorf("legacy querier not supported for the x/%s module", types.ModuleName) } @@ -157,7 +157,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { // EndBlock executes all ABCI EndBlock logic respective to the participationrewards module. It // returns no validator updates. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -169,25 +169,25 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the pool-incentives module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) { +func (AppModule) GenerateGenesisState(_ *module.SimulationState) { // simulation.RandomizedGenState(simState) } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // RandomizedParams creates randomized pool-incentives param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { return nil } // RegisterStoreDecoder registers a decoder for supply module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { } // WeightedOperations returns the all the gov module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { +func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil // TODO } diff --git a/x/participationrewards/types/proposals.go b/x/participationrewards/types/proposals.go index 25e3a67c0..5c6cdd6bf 100644 --- a/x/participationrewards/types/proposals.go +++ b/x/participationrewards/types/proposals.go @@ -15,7 +15,7 @@ const ( var _ govv1beta1.Content = &AddProtocolDataProposal{} -func NewAddProtocolDataProposal(title string, description string, datatype string, protocol string, key string, data json.RawMessage) *AddProtocolDataProposal { +func NewAddProtocolDataProposal(title string, description string, datatype string, _ string, key string, data json.RawMessage) *AddProtocolDataProposal { return &AddProtocolDataProposal{Title: title, Description: description, Type: datatype, Data: data, Key: key} } diff --git a/x/tokenfactory/keeper/createdenom.go b/x/tokenfactory/keeper/createdenom.go index 6fdb6d993..69fd276bf 100644 --- a/x/tokenfactory/keeper/createdenom.go +++ b/x/tokenfactory/keeper/createdenom.go @@ -9,14 +9,14 @@ import ( "github.com/ingenuity-build/quicksilver/x/tokenfactory/types" ) -// ConvertToBaseToken converts a fee amount in a whitelisted fee token to the base fee token amount +// CreateDenom converts a fee amount in a whitelisted fee token to the base fee token amount func (k Keeper) CreateDenom(ctx sdk.Context, creatorAddr string, subdenom string) (newTokenDenom string, err error) { denom, err := k.validateCreateDenom(ctx, creatorAddr, subdenom) if err != nil { return "", err } - err = k.chargeForCreateDenom(ctx, creatorAddr, subdenom) + err = k.chargeForCreateDenom(ctx, creatorAddr) if err != nil { return "", err } @@ -70,7 +70,7 @@ func (k Keeper) validateCreateDenom(ctx sdk.Context, creatorAddr string, subdeno return denom, nil } -func (k Keeper) chargeForCreateDenom(ctx sdk.Context, creatorAddr string, subdenom string) (err error) { //nolint:unparam +func (k Keeper) chargeForCreateDenom(ctx sdk.Context, creatorAddr string) (err error) { // Send creation fee to community pool creationFee := k.GetParams(ctx).DenomCreationFee accAddr, err := sdk.AccAddressFromBech32(creatorAddr) diff --git a/x/tokenfactory/keeper/grpc_query.go b/x/tokenfactory/keeper/grpc_query.go index 80ced2722..2ab0a2fd3 100644 --- a/x/tokenfactory/keeper/grpc_query.go +++ b/x/tokenfactory/keeper/grpc_query.go @@ -10,7 +10,7 @@ import ( var _ types.QueryServer = Keeper{} -func (k Keeper) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { +func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) params := k.GetParams(sdkCtx) diff --git a/x/tokenfactory/module.go b/x/tokenfactory/module.go index 5b93f900f..2b65672e3 100644 --- a/x/tokenfactory/module.go +++ b/x/tokenfactory/module.go @@ -67,7 +67,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the x/tokenfactory module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -131,7 +131,7 @@ func (am AppModule) Route() sdk.Route { func (AppModule) QuerierRoute() string { return types.QuerierRoute } // LegacyQuerierHandler returns the x/tokenfactory module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return nil } @@ -185,18 +185,17 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { return nil } // RandomizedParams creates randomized mint param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { return []simtypes.ParamChange{} } // RegisterStoreDecoder registers a decoder for mint module's types. -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { - // sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) +func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { } // WeightedOperations doesn't return any mint module operation. diff --git a/x/tokenfactory/types/params.go b/x/tokenfactory/types/params.go index 94f258d93..1e0dcb63d 100644 --- a/x/tokenfactory/types/params.go +++ b/x/tokenfactory/types/params.go @@ -29,11 +29,7 @@ func NewParams(denomCreationFee sdk.Coins) Params { // Validate validates params. func (p Params) Validate() error { - if err := validateDenomCreationFee(p.DenomCreationFee); err != nil { - return err - } - - return nil + return validateDenomCreationFee(p.DenomCreationFee) } // ParamSetPairs implements params.ParamSet.