From 4dd218b724e48810aaadbc04ca8d42ca135637d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Koll=C3=A1r?= <10644651+rkollar@users.noreply.github.com> Date: Tue, 17 Sep 2024 21:20:45 +0200 Subject: [PATCH] Upgrade to cosmos-sdk v0.50 --- Dockerfile | 20 +- Makefile | 10 +- app/ante/ante.go | 4 +- app/app.go | 408 ++++++++----- app/encoding.go | 6 +- app/export.go | 161 ++++-- app/params/encoding.go | 2 +- app/simulation_test.go | 48 +- app/upgrades/v1/upgrades.go | 18 + cmd/sscd/cmd/config.go | 30 +- cmd/sscd/cmd/genaccounts.go | 5 +- cmd/sscd/cmd/root.go | 122 ++-- cmd/sscd/main.go | 15 +- go.mod | 189 +++--- go.sum | 496 ++++++++-------- proto/ssc/billing/tx.proto | 3 + proto/ssc/chainlet/genesis.proto | 2 + proto/ssc/chainlet/query.proto | 2 + proto/ssc/chainlet/tx.proto | 7 + proto/ssc/escrow/chainlet_account.proto | 6 +- proto/ssc/escrow/tx.proto | 5 + proto/ssc/peers/tx.proto | 3 + proto/ssc/ssc/genesis.proto | 10 - proto/ssc/ssc/params.proto | 9 - proto/ssc/ssc/query.proto | 26 - proto/ssc/ssc/tx.proto | 7 - testutil/keeper/billing.go | 17 +- testutil/keeper/chainlet.go | 22 +- testutil/keeper/epochs.go | 16 +- testutil/keeper/escrow.go | 17 +- testutil/keeper/peers.go | 21 +- testutil/keeper/ssc.go | 52 -- testutil/network/network.go | 14 +- .../client/cli/query_get_billing_history.go | 4 - .../cli/query_get_validator_payout_history.go | 4 - x/billing/keeper/billing.go | 2 +- .../keeper/grpc_query_get_billing_history.go | 2 +- ...grpc_query_get_validator_payout_history.go | 2 +- x/billing/keeper/hooks.go | 9 +- x/billing/keeper/keeper.go | 10 +- x/billing/module.go | 11 +- x/billing/module_simulation.go | 4 - x/billing/testutil/expected_keepers_mocks.go | 116 ++-- x/billing/types/expected_keepers.go | 38 +- x/billing/types/tx.pb.go | 17 +- x/chainlet/client/cli/query_get_chainlet.go | 4 - .../client/cli/query_get_chainlet_stack.go | 4 - .../client/cli/query_list_chainlet_stack.go | 4 - x/chainlet/client/cli/query_list_chainlets.go | 4 - x/chainlet/keeper/abci.go | 6 +- x/chainlet/keeper/ccv.go | 10 +- x/chainlet/keeper/chainlet.go | 2 +- x/chainlet/keeper/chainlet_stack.go | 2 +- .../keeper/grpc_query_list_chainlet_stack.go | 2 +- .../keeper/grpc_query_list_chainlets.go | 2 +- x/chainlet/keeper/keeper.go | 15 +- x/chainlet/keeper/keeper_test.go | 61 +- x/chainlet/keeper/migrations.go | 10 +- .../msg_server_create_chainlet_stack.go | 10 +- .../msg_server_disable_stack_version.go | 13 +- .../msg_server_update_chainlet_stack.go | 10 +- x/chainlet/keeper/versions.go | 2 +- x/chainlet/migrations/v2/store.go | 64 +-- x/chainlet/module.go | 28 +- x/chainlet/module_simulation.go | 11 +- x/chainlet/testutil/expected_keepers_mocks.go | 51 +- x/chainlet/types/expected_keepers.go | 18 +- .../types/message_create_chainlet_stack.go | 19 +- .../types/message_disable_chainlet_stack.go | 13 - x/chainlet/types/message_launch_chainlet.go | 13 - .../types/message_update_chainlet_stack.go | 13 - x/chainlet/types/message_upgrade_chainlet.go | 13 - x/chainlet/types/tx.pb.go | 88 +-- x/epochs/keeper/abci.go | 5 +- x/epochs/keeper/abci_test.go | 42 +- x/epochs/keeper/epoch.go | 8 +- x/epochs/keeper/keeper.go | 4 +- x/epochs/module.go | 11 +- x/epochs/types/hooks.go | 2 +- x/escrow/client/cli/query_balance.go | 3 - .../client/cli/query_get_chainlet_account.go | 4 - x/escrow/client/cli/tx_deposit.go | 4 - x/escrow/client/cli/tx_withdraw.go | 4 - x/escrow/keeper/escrow.go | 14 +- x/escrow/keeper/grpc_query_balance.go | 2 +- x/escrow/keeper/keeper.go | 9 +- x/escrow/module.go | 11 +- x/escrow/module_simulation.go | 8 +- x/escrow/testutil/expected_keepers_mocks.go | 14 +- x/escrow/types/chainlet_account.pb.go | 64 +-- x/escrow/types/expected_keepers.go | 13 +- x/escrow/types/message_deposit.go | 16 +- x/escrow/types/message_withdraw.go | 13 - x/escrow/types/tx.pb.go | 35 +- x/peers/client/cli/query_peers.go | 4 - x/peers/keeper/data.go | 2 +- x/peers/keeper/keeper.go | 15 +- x/peers/module.go | 11 +- x/peers/types/message_set_peers.go | 13 - x/peers/types/tx.pb.go | 29 +- x/ssc/client/cli/query.go | 31 - x/ssc/client/cli/query_params.go | 36 -- x/ssc/client/cli/tx.go | 36 -- x/ssc/genesis.go | 23 - x/ssc/genesis_test.go | 29 - x/ssc/keeper/keeper.go | 46 -- x/ssc/keeper/msg_server.go | 17 - x/ssc/keeper/msg_server_test.go | 23 - x/ssc/keeper/params.go | 16 - x/ssc/keeper/params_test.go | 18 - x/ssc/keeper/query.go | 7 - x/ssc/keeper/query_params.go | 19 - x/ssc/keeper/query_params_test.go | 21 - x/ssc/module.go | 148 ----- x/ssc/module_simulation.go | 64 --- x/ssc/simulation/helpers.go | 15 - x/ssc/types/codec.go | 23 - x/ssc/types/errors.go | 12 - x/ssc/types/expected_keepers.go | 18 - x/ssc/types/genesis.go | 24 - x/ssc/types/genesis.pb.go | 320 ----------- x/ssc/types/genesis_test.go | 41 -- x/ssc/types/keys.go | 19 - x/ssc/types/params.go | 39 -- x/ssc/types/params.pb.go | 263 --------- x/ssc/types/query.pb.go | 537 ------------------ x/ssc/types/query.pb.gw.go | 153 ----- x/ssc/types/tx.pb.go | 80 --- x/ssc/types/types.go | 1 - 129 files changed, 1364 insertions(+), 3559 deletions(-) create mode 100644 app/upgrades/v1/upgrades.go delete mode 100644 proto/ssc/ssc/genesis.proto delete mode 100644 proto/ssc/ssc/params.proto delete mode 100644 proto/ssc/ssc/query.proto delete mode 100644 proto/ssc/ssc/tx.proto delete mode 100644 testutil/keeper/ssc.go delete mode 100644 x/ssc/client/cli/query.go delete mode 100644 x/ssc/client/cli/query_params.go delete mode 100644 x/ssc/client/cli/tx.go delete mode 100644 x/ssc/genesis.go delete mode 100644 x/ssc/genesis_test.go delete mode 100644 x/ssc/keeper/keeper.go delete mode 100644 x/ssc/keeper/msg_server.go delete mode 100644 x/ssc/keeper/msg_server_test.go delete mode 100644 x/ssc/keeper/params.go delete mode 100644 x/ssc/keeper/params_test.go delete mode 100644 x/ssc/keeper/query.go delete mode 100644 x/ssc/keeper/query_params.go delete mode 100644 x/ssc/keeper/query_params_test.go delete mode 100644 x/ssc/module.go delete mode 100644 x/ssc/module_simulation.go delete mode 100644 x/ssc/simulation/helpers.go delete mode 100644 x/ssc/types/codec.go delete mode 100644 x/ssc/types/errors.go delete mode 100644 x/ssc/types/expected_keepers.go delete mode 100644 x/ssc/types/genesis.go delete mode 100644 x/ssc/types/genesis.pb.go delete mode 100644 x/ssc/types/genesis_test.go delete mode 100644 x/ssc/types/keys.go delete mode 100644 x/ssc/types/params.go delete mode 100644 x/ssc/types/params.pb.go delete mode 100644 x/ssc/types/query.pb.go delete mode 100644 x/ssc/types/query.pb.gw.go delete mode 100644 x/ssc/types/tx.pb.go delete mode 100644 x/ssc/types/types.go diff --git a/Dockerfile b/Dockerfile index 5ac024f..42a7582 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,23 @@ -ARG GO_VERSION="1.20" -ARG RUNNER_IMAGE="golang:${GO_VERSION}-alpine3.17" +ARG GO_VERSION="1.22.5" +FROM golang:${GO_VERSION}-bookworm AS build-env +ARG GITHUB_USER +ARG GITHUB_TOKEN -FROM golang:${GO_VERSION}-bullseye AS build-env - -WORKDIR /go/src/github.com/sagaxyz/sagacli +WORKDIR /root RUN apt-get update -y COPY . . +RUN git config --global --add url."https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" RUN make build -FROM ${RUNNER_IMAGE} +FROM golang:${GO_VERSION}-alpine3.20 -COPY --from=build-env /go/src/github.com/sagaxyz/sagacli/build/sscd /usr/bin/sscd +COPY --from=build-env /root/build/sscd /usr/bin/ +COPY --from=build-env /root/start.sh /root/ -RUN apk add gcompat bash +RUN apk add gcompat bash curl EXPOSE 26656 EXPOSE 26660 @@ -23,4 +25,4 @@ EXPOSE 26657 EXPOSE 1317 EXPOSE 9090 -CMD ["sscd", "start"] \ No newline at end of file +CMD ["bash","/root/start.sh"] diff --git a/Makefile b/Makefile index 4eb2c89..ce6fc85 100644 --- a/Makefile +++ b/Makefile @@ -203,10 +203,10 @@ all: tools build lint test vulncheck # .PHONY: build build-linux-amd64 build-linux-arm64 cosmovisor -# mocks: $(MOCKS_DIR) -# @go install github.com/golang/mock/mockgen@v1.6.0 -# sh ./scripts/mockgen.sh -# .PHONY: mocks +mocks: $(MOCKS_DIR) + @go install github.com/golang/mock/mockgen@v1.6.0 + sh ./scripts/mockgen.sh +.PHONY: mocks # vulncheck: $(BUILDDIR)/ @@ -605,4 +605,4 @@ release: ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \ release --rm-dist --skip-validate -.PHONY: release-dry-run release \ No newline at end of file +.PHONY: release-dry-run release diff --git a/app/ante/ante.go b/app/ante/ante.go index 7401e6f..ad5c59b 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" - ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" sagaante "github.com/sagaxyz/saga-sdk/ante" ) diff --git a/app/app.go b/app/app.go index 6be7599..ebfddf1 100644 --- a/app/app.go +++ b/app/app.go @@ -1,6 +1,7 @@ package app import ( + "encoding/json" "fmt" "io" "os" @@ -8,31 +9,51 @@ import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/client/v2/autocli" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/evidence" + evidencekeeper "cosmossdk.io/x/evidence/keeper" + evidencetypes "cosmossdk.io/x/evidence/types" + "cosmossdk.io/x/feegrant" + feegrantkeeper "cosmossdk.io/x/feegrant/keeper" + feegrantmodule "cosmossdk.io/x/feegrant/module" + "cosmossdk.io/x/tx/signing" + "cosmossdk.io/x/upgrade" + upgradekeeper "cosmossdk.io/x/upgrade/keeper" + upgradetypes "cosmossdk.io/x/upgrade/types" abci "github.com/cometbft/cometbft/abci/types" - tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" tmos "github.com/cometbft/cometbft/libs/os" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" - "github.com/cosmos/cosmos-sdk/runtime/services" + runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" + "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/cosmos-sdk/std" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/types/msgservice" + sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/tx" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" @@ -42,9 +63,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" @@ -54,12 +72,6 @@ import ( distr "github.com/cosmos/cosmos-sdk/x/distribution" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" @@ -84,42 +96,38 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" - upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/ibc-go/modules/capability" + ibccapabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + ibccapabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "github.com/ignite/cli/ignite/pkg/openapiconsole" "github.com/spf13/cast" - ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" - icacontroller "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller" - icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" - "github.com/cosmos/ibc-go/v7/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v7/modules/core" - ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - ibcporttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - solomachine "github.com/cosmos/ibc-go/v7/modules/light-clients/06-solomachine" - ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - - ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" - ccvprovider "github.com/cosmos/interchain-security/v4/x/ccv/provider" - ccvproviderkeeper "github.com/cosmos/interchain-security/v4/x/ccv/provider/keeper" - ccvprovidertypes "github.com/cosmos/interchain-security/v4/x/ccv/provider/types" - sscmodule "github.com/sagaxyz/ssc/x/ssc" - sscmodulekeeper "github.com/sagaxyz/ssc/x/ssc/keeper" - sscmoduletypes "github.com/sagaxyz/ssc/x/ssc/types" + ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" + icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" + icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" + icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v8/modules/core" + ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + ibcporttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + solomachine "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine" + ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + + ibcmock "github.com/cosmos/ibc-go/v8/testing/mock" + ccvprovider "github.com/cosmos/interchain-security/v5/x/ccv/provider" + ccvproviderkeeper "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper" + ccvprovidertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" sagaante "github.com/sagaxyz/saga-sdk/ante" acl "github.com/sagaxyz/saga-sdk/x/acl" @@ -145,7 +153,6 @@ import ( // this line is used by starport scaffolding # stargate/app/moduleImport ante "github.com/sagaxyz/ssc/app/ante" - appparams "github.com/sagaxyz/ssc/app/params" "github.com/sagaxyz/ssc/docs" ) @@ -162,10 +169,6 @@ func getGovProposalHandlers() []govclient.ProposalHandler { govProposalHandlers = append(govProposalHandlers, paramsclient.ProposalHandler, - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, - ibcclientclient.UpgradeProposalHandler, // this line is used by starport scaffolding # stargate/app/govProposalHandler ) @@ -202,7 +205,6 @@ var ( transfer.AppModuleBasic{}, ica.AppModuleBasic{}, vesting.AppModuleBasic{}, - sscmodule.AppModuleBasic{}, chainletmodule.AppModuleBasic{}, epochsmodule.AppModuleBasic{}, escrowmodule.AppModuleBasic{}, @@ -258,8 +260,6 @@ type App struct { interfaceRegistry types.InterfaceRegistry txConfig client.TxConfig - invCheckPeriod uint - // keys to access the substores keys map[string]*storetypes.KVStoreKey tkeys map[string]*storetypes.TransientStoreKey @@ -269,7 +269,7 @@ type App struct { AccountKeeper authkeeper.AccountKeeper AuthzKeeper authzkeeper.Keeper BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper + CapabilityKeeper *ibccapabilitykeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper @@ -288,11 +288,10 @@ type App struct { ConsensusParamsKeeper consensusparamkeeper.Keeper EpochsKeeper epochskeeper.Keeper // make scoped keepers public for test purposes - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedTransferKeeper capabilitykeeper.ScopedKeeper - ScopedICAHostKeeper capabilitykeeper.ScopedKeeper + ScopedIBCKeeper ibccapabilitykeeper.ScopedKeeper + ScopedTransferKeeper ibccapabilitykeeper.ScopedKeeper + ScopedICAHostKeeper ibccapabilitykeeper.ScopedKeeper - SscKeeper sscmodulekeeper.Keeper ChainletKeeper *chainletmodulekeeper.Keeper EscrowKeeper escrowmodulekeeper.Keeper BillingKeeper billingmodulekeeper.Keeper @@ -301,7 +300,8 @@ type App struct { // this line is used by starport scaffolding # stargate/app/keeperDeclaration // mm is the module manager - mm *module.Manager + mm *module.Manager + bmm module.BasicManager // sm is the simulation manager sm *module.SimulationManager @@ -314,37 +314,45 @@ func New( db dbm.DB, traceStore io.Writer, loadLatest bool, - skipUpgradeHeights map[int64]bool, - homePath string, - invCheckPeriod uint, - encodingConfig appparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *App { - appCodec := encodingConfig.Marshaler - cdc := encodingConfig.Amino - interfaceRegistry := encodingConfig.InterfaceRegistry - txConfig := encodingConfig.TxConfig + interfaceRegistry, _ := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{ + ProtoFiles: proto.HybridResolver, + SigningOptions: signing.Options{ + AddressCodec: address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), + }, + ValidatorAddressCodec: address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(), + }, + }, + }) + appCodec := codec.NewProtoCodec(interfaceRegistry) + legacyAmino := codec.NewLegacyAmino() + txConfig := tx.NewTxConfig(appCodec, tx.DefaultSignModes) - bApp := baseapp.NewBaseApp( - Name, - logger, - db, - encodingConfig.TxConfig.TxDecoder(), - baseAppOptions..., - ) + std.RegisterLegacyAminoCodec(legacyAmino) + std.RegisterInterfaces(interfaceRegistry) + + voteExtOp := func(bApp *baseapp.BaseApp) { + //voteExtHandler := NewVoteExtensionHandler() + //voteExtHandler.SetHandlers(bApp) + } + baseAppOptions = append(baseAppOptions, voteExtOp, baseapp.SetOptimisticExecution()) + + bApp := baseapp.NewBaseApp(Name, logger, db, txConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) bApp.SetTxEncoder(txConfig.TxEncoder()) - keys := sdk.NewKVStoreKeys( + keys := storetypes.NewKVStoreKeys( authtypes.StoreKey, authz.ModuleName, banktypes.StoreKey, stakingtypes.StoreKey, crisistypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, ibcexported.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, icahosttypes.StoreKey, - capabilitytypes.StoreKey, group.StoreKey, icacontrollertypes.StoreKey, consensusparamtypes.StoreKey, - sscmoduletypes.StoreKey, + ibccapabilitytypes.StoreKey, group.StoreKey, icacontrollertypes.StoreKey, consensusparamtypes.StoreKey, chainletmoduletypes.StoreKey, epochstypes.StoreKey, escrowmoduletypes.StoreKey, @@ -354,16 +362,15 @@ func New( ccvprovidertypes.StoreKey, // this line is used by starport scaffolding # stargate/app/storeKey ) - tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) - memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) + tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey) + memKeys := storetypes.NewMemoryStoreKeys(ibccapabilitytypes.MemStoreKey) app := &App{ BaseApp: bApp, - cdc: cdc, + cdc: legacyAmino, appCodec: appCodec, interfaceRegistry: interfaceRegistry, - txConfig: encodingConfig.TxConfig, - invCheckPeriod: invCheckPeriod, + txConfig: txConfig, keys: keys, tkeys: tkeys, memKeys: memKeys, @@ -371,7 +378,7 @@ func New( app.ParamsKeeper = initParamsKeeper( appCodec, - cdc, + legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey], ) @@ -380,16 +387,17 @@ func New( // bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable())) app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper( appCodec, - keys[consensusparamtypes.StoreKey], + runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]), authtypes.NewModuleAddress(govtypes.ModuleName).String(), + runtime.EventService{}, ) - bApp.SetParamStore(&app.ConsensusParamsKeeper) + bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore) // add capability keeper and ScopeToModule for ibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper( + app.CapabilityKeeper = ibccapabilitykeeper.NewKeeper( appCodec, - keys[capabilitytypes.StoreKey], - memKeys[capabilitytypes.MemStoreKey], + keys[ibccapabilitytypes.StoreKey], + memKeys[ibccapabilitytypes.MemStoreKey], ) // grant capabilities for the ibc and ibc-transfer modules @@ -403,15 +411,16 @@ func New( // add keepers app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, - keys[authtypes.StoreKey], + runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, - sdk.Bech32PrefixAccAddr, + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + sdk.GetConfig().GetBech32AccountAddrPrefix(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.AuthzKeeper = authzkeeper.NewKeeper( - keys[authz.ModuleName], + runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), appCodec, app.MsgServiceRouter(), app.AccountKeeper, @@ -419,29 +428,45 @@ func New( app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, - keys[banktypes.StoreKey], + runtime.NewKVStoreService(keys[banktypes.StoreKey]), app.AccountKeeper, app.BlockedModuleAccountAddrs(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), + logger, ) + enabledSignModes := append(tx.DefaultSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) + txConfigOpts := tx.ConfigOptions{ + EnabledSignModes: enabledSignModes, + TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), + } + txConfig, err := tx.NewTxConfigWithOptions( + appCodec, + txConfigOpts, + ) + if err != nil { + panic(err) + } + app.txConfig = txConfig app.StakingKeeper = stakingkeeper.NewKeeper( appCodec, - keys[stakingtypes.StoreKey], + runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), ) app.FeeGrantKeeper = feegrantkeeper.NewKeeper( appCodec, - keys[feegrant.StoreKey], + runtime.NewKVStoreService(keys[feegrant.StoreKey]), app.AccountKeeper, ) app.MintKeeper = mintkeeper.NewKeeper( appCodec, - keys[minttypes.StoreKey], + runtime.NewKVStoreService(keys[minttypes.StoreKey]), app.StakingKeeper, app.AccountKeeper, app.BankKeeper, @@ -451,7 +476,7 @@ func New( app.DistrKeeper = distrkeeper.NewKeeper( appCodec, - keys[distrtypes.StoreKey], + runtime.NewKVStoreService(keys[distrtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, @@ -461,19 +486,21 @@ func New( app.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, - cdc, - keys[slashingtypes.StoreKey], + legacyAmino, + runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), app.StakingKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) app.CrisisKeeper = crisiskeeper.NewKeeper( appCodec, - keys[crisistypes.StoreKey], + runtime.NewKVStoreService(keys[crisistypes.StoreKey]), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.AccountKeeper.AddressCodec(), ) groupConfig := group.DefaultConfig() @@ -489,9 +516,14 @@ func New( groupConfig, ) + skipUpgradeHeights := map[int64]bool{} + for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { + skipUpgradeHeights[int64(h)] = true + } + homePath := cast.ToString(appOpts.Get(flags.FlagHome)) app.UpgradeKeeper = upgradekeeper.NewKeeper( skipUpgradeHeights, - keys[upgradetypes.StoreKey], + runtime.NewKVStoreService(keys[upgradetypes.StoreKey]), appCodec, homePath, app.BaseApp, @@ -514,6 +546,7 @@ func New( app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // Create Transfer Keepers @@ -523,30 +556,37 @@ func New( app.GetSubspace(ibctransfertypes.ModuleName), app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, + app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) transferModule := transfer.NewAppModule(app.TransferKeeper) transferIBCModule := transfer.NewIBCModule(app.TransferKeeper) app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, keys[icahosttypes.StoreKey], + appCodec, + keys[icahosttypes.StoreKey], app.GetSubspace(icahosttypes.SubModuleName), app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, + app.IBCKeeper.PortKeeper, app.AccountKeeper, scopedICAHostKeeper, app.MsgServiceRouter(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + app.ICAHostKeeper.WithQueryRouter(bApp.GRPCQueryRouter()) + icaControllerKeeper := icacontrollerkeeper.NewKeeper( - appCodec, keys[icacontrollertypes.StoreKey], + appCodec, + keys[icacontrollertypes.StoreKey], app.GetSubspace(icacontrollertypes.SubModuleName), app.IBCKeeper.ChannelKeeper, // may be replaced with middleware such as ics29 fee - app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, + app.IBCKeeper.ChannelKeeper, app.IBCKeeper.PortKeeper, scopedICAControllerKeeper, app.MsgServiceRouter(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) icaModule := ica.NewAppModule(&icaControllerKeeper, &app.ICAHostKeeper) icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) @@ -554,9 +594,11 @@ func New( // Create evidence Keeper for to register the IBC light client misbehaviour evidence route evidenceKeeper := evidencekeeper.NewKeeper( appCodec, - keys[evidencetypes.StoreKey], + runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), app.StakingKeeper, app.SlashingKeeper, + app.AccountKeeper.AddressCodec(), + runtime.ProvideCometInfoService(), ) // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper @@ -565,16 +607,16 @@ func New( govRouter. AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). AddRoute(ccvprovidertypes.RouterKey, ccvprovider.NewProviderProposalHandler(app.ProviderKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) govConfig := govtypes.DefaultConfig() app.GovKeeper = govkeeper.NewKeeper( appCodec, - keys[govtypes.StoreKey], + runtime.NewKVStoreService(keys[govtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, + app.DistrKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String(), @@ -593,7 +635,7 @@ func New( app.GetSubspace(ccvprovidertypes.ModuleName), scopedIBCProviderKeeper, app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, + app.IBCKeeper.PortKeeper, app.IBCKeeper.ConnectionKeeper, app.IBCKeeper.ClientKeeper, app.StakingKeeper, @@ -601,7 +643,10 @@ func New( app.AccountKeeper, app.DistrKeeper, app.BankKeeper, - app.GovKeeper, + *app.GovKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), authtypes.FeeCollectorName, ) providerModule := ccvprovider.NewAppModule(&app.ProviderKeeper, app.GetSubspace(ccvprovidertypes.ModuleName)) @@ -620,7 +665,6 @@ func New( app.EscrowKeeper = *escrowmodulekeeper.NewKeeper( appCodec, keys[escrowmoduletypes.StoreKey], - keys[escrowmoduletypes.MemStoreKey], app.GetSubspace(escrowmoduletypes.ModuleName), app.BankKeeper, nil, @@ -629,7 +673,6 @@ func New( app.BillingKeeper = *billingmodulekeeper.NewKeeper( appCodec, keys[billingmoduletypes.StoreKey], - keys[billingmoduletypes.MemStoreKey], app.GetSubspace(billingmoduletypes.ModuleName), app.BankKeeper, app.EscrowKeeper, @@ -650,7 +693,6 @@ func New( app.ChainletKeeper = chainletmodulekeeper.NewKeeper( appCodec, keys[chainletmoduletypes.StoreKey], - keys[chainletmoduletypes.MemStoreKey], app.GetSubspace(chainletmoduletypes.ModuleName), app.ProviderKeeper, app.BillingKeeper, @@ -662,7 +704,6 @@ func New( app.PeersKeeper = peerskeeper.New( appCodec, keys[peerstypes.StoreKey], - keys[peerstypes.MemStoreKey], app.GetSubspace(peerstypes.ModuleName), app.ChainletKeeper, ) @@ -681,14 +722,6 @@ func New( ) epochsModule := epochsmodule.NewAppModule(app.EpochsKeeper) - app.SscKeeper = *sscmodulekeeper.NewKeeper( - appCodec, - keys[sscmoduletypes.StoreKey], - keys[sscmoduletypes.MemStoreKey], - app.GetSubspace(sscmoduletypes.ModuleName), - ) - sscModule := sscmodule.NewAppModule(appCodec, app.SscKeeper, app.AccountKeeper, app.BankKeeper) - // this line is used by starport scaffolding # stargate/app/keeperDefinition /**** IBC Routing ****/ @@ -714,13 +747,12 @@ func New( // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. - app.mm = module.NewManager( genutil.NewAppModule( app.AccountKeeper, app.StakingKeeper, - app.BaseApp.DeliverTx, - encodingConfig.TxConfig, + app, + txConfig, ), auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), @@ -732,18 +764,18 @@ func New( crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), + slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), - upgrade.NewAppModule(app.UpgradeKeeper), + upgrade.NewAppModule(app.UpgradeKeeper, app.AccountKeeper.AddressCodec()), evidence.NewAppModule(app.EvidenceKeeper), consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper), ibc.NewAppModule(app.IBCKeeper), + ibctm.NewAppModule(), params.NewAppModule(app.ParamsKeeper), transferModule, providerModule, icaModule, - sscModule, chainletModule, epochsModule, escrowModule, @@ -752,16 +784,34 @@ func New( peersModule, // this line is used by starport scaffolding # stargate/app/appModule ) + // BasicModuleManager defines the module BasicManager is in charge of setting up basic, + // non-dependant module elements, such as codec registration and genesis verification. + // By default it is composed of all the module from the module manager. + // Additionally, app module basics can be overwritten by passing them as argument. + app.bmm = module.NewBasicManagerFromManager( + app.mm, + map[string]module.AppModuleBasic{ + genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + govtypes.ModuleName: gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + }, + ), + }) + app.bmm.RegisterLegacyAminoCodec(legacyAmino) + app.bmm.RegisterInterfaces(interfaceRegistry) + + app.mm.SetOrderPreBlockers( + upgradetypes.ModuleName, + ) // During begin block slashing happens after distr.BeginBlocker so that // there is nothing left over in the validator fee pool, so as to keep the // CanWithdrawInvariant invariant. // NOTE: staking module is required if HistoricalEntries param > 0 app.mm.SetOrderBeginBlockers( - // upgrades should be run first - upgradetypes.ModuleName, epochstypes.ModuleName, - capabilitytypes.ModuleName, + ibccapabilitytypes.ModuleName, minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, @@ -781,7 +831,6 @@ func New( group.ModuleName, paramstypes.ModuleName, vestingtypes.ModuleName, - sscmoduletypes.ModuleName, chainletmoduletypes.ModuleName, escrowmoduletypes.ModuleName, billingmoduletypes.ModuleName, @@ -802,7 +851,7 @@ func New( icatypes.ModuleName, ibcfeetypes.ModuleName, ibcmock.ModuleName, - capabilitytypes.ModuleName, + ibccapabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, @@ -816,7 +865,6 @@ func New( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, - sscmoduletypes.ModuleName, chainletmoduletypes.ModuleName, escrowmoduletypes.ModuleName, billingmoduletypes.ModuleName, @@ -832,7 +880,7 @@ func New( // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. genesisModuleOrder := []string{ - capabilitytypes.ModuleName, + ibccapabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, @@ -856,7 +904,6 @@ func New( upgradetypes.ModuleName, vestingtypes.ModuleName, epochstypes.ModuleName, - sscmoduletypes.ModuleName, chainletmoduletypes.ModuleName, escrowmoduletypes.ModuleName, billingmoduletypes.ModuleName, @@ -875,13 +922,16 @@ func New( // app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - app.mm.RegisterServices(app.configurator) + err = app.mm.RegisterServices(app.configurator) + if err != nil { + panic(err) + } app.RegisterUpgradeHandlers() - autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), services.NewAutoCLIQueryService(app.mm.Modules)) + autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.mm.Modules)) - reflectionSvc, err := services.NewReflectionService() + reflectionSvc, err := runtimeservices.NewReflectionService() if err != nil { panic(err) } @@ -906,15 +956,29 @@ func New( // initialize BaseApp app.SetInitChainer(app.InitChainer) + app.SetPreBlocker(app.PreBlocker) app.SetBeginBlocker(app.BeginBlocker) app.SetEndBlocker(app.EndBlocker) + // At startup, after all modules have been registered, check that all prot + // annotations are correct. + protoFiles, err := proto.MergedRegistry() + if err != nil { + panic(err) + } + err = msgservice.ValidateProtoAnnotations(protoFiles) + if err != nil { + // Once we switch to using protoreflect-based antehandlers, we might + // want to panic here instead of logging a warning. + fmt.Fprintln(os.Stderr, err.Error()) + } + anteHandler, err := ante.NewAnteHandler( ante.HandlerOptions{ HandlerOptions: authante.HandlerOptions{ AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), + SignModeHandler: txConfig.SignModeHandler(), FeegrantKeeper: app.FeeGrantKeeper, SigGasConsumer: authante.DefaultSigVerificationGasConsumer, TxFeeChecker: sagaante.CheckTxFeeWithValidatorMinGasPrices( @@ -951,23 +1015,32 @@ func New( // Name returns the name of the App func (app *App) Name() string { return app.BaseApp.Name() } -// BeginBlocker application updates every begin block -func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - return app.mm.BeginBlock(ctx, req) +// PreBlocker application updates every pre block +func (app *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + return app.mm.PreBlock(ctx) +} + +// BeginBlocker applicaTion updates every begin block +func (app *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { + return app.mm.BeginBlock(ctx) } // EndBlocker application updates every end block -func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.mm.EndBlock(ctx, req) +func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { + return app.mm.EndBlock(ctx) } // InitChainer application update at chain initialization -func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { +func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { var genesisState GenesisState - if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { - panic(err) + if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { + return nil, err } - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) + + if err := app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()); err != nil { + return nil, err + } + return app.mm.InitGenesis(ctx, app.appCodec, genesisState) } @@ -1063,7 +1136,7 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. - tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + cmtservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register node gRPC service for grpc-gateway. nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) @@ -1082,7 +1155,7 @@ func (app *App) RegisterTxService(clientCtx client.Context) { // RegisterTendermintService implements the Application.RegisterTendermintService method. func (app *App) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService( + cmtservice.RegisterTendermintService( clientCtx, app.BaseApp.GRPCQueryRouter(), app.interfaceRegistry, @@ -1091,8 +1164,8 @@ func (app *App) RegisterTendermintService(clientCtx client.Context) { } // RegisterNodeService implements the Application.RegisterNodeService method. -func (app *App) RegisterNodeService(clientCtx client.Context) { - nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +func (app *App) RegisterNodeService(clientCtx client.Context, cfg config.Config) { + nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), cfg) } // GetMaccPerms returns a copy of the module account permissions @@ -1122,7 +1195,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(ibcfeetypes.ModuleName) paramsKeeper.Subspace(icacontrollertypes.SubModuleName) paramsKeeper.Subspace(icahosttypes.SubModuleName) - paramsKeeper.Subspace(sscmoduletypes.ModuleName) paramsKeeper.Subspace(chainletmoduletypes.ModuleName) paramsKeeper.Subspace(epochstypes.ModuleName) paramsKeeper.Subspace(escrowmoduletypes.ModuleName) @@ -1145,6 +1217,7 @@ func (app *App) ModuleManager() *module.Manager { } func (app *App) RegisterUpgradeHandlers() { + //app.UpgradeKeeper.SetUpgradeHandler(upgrade1.Name, upgrade1.UpgradeHandler(app.mm, app.configurator, app.ParamsKeeper, &app.ConsensusParamsKeeper)) upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() if err != nil { @@ -1162,3 +1235,24 @@ func (app *App) RegisterUpgradeHandlers() { app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, storeUpgrades)) } } + +// AutoCliOpts returns the autocli options for the app. +func (app *App) AutoCliOpts() autocli.AppOptions { + modules := make(map[string]appmodule.AppModule, 0) + for _, m := range app.mm.Modules { + if moduleWithName, ok := m.(module.HasName); ok { + moduleName := moduleWithName.Name() + if appModule, ok := moduleWithName.(appmodule.AppModule); ok { + modules[moduleName] = appModule + } + } + } + + return autocli.AppOptions{ + Modules: modules, + ModuleOptions: runtimeservices.ExtractAutoCLIOptions(app.mm.Modules), + AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + ValidatorAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), + } +} diff --git a/app/encoding.go b/app/encoding.go index a0d039f..d6d01c1 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -13,12 +13,12 @@ import ( func makeEncodingConfig() params.EncodingConfig { amino := codec.NewLegacyAmino() interfaceRegistry := types.NewInterfaceRegistry() - marshaler := codec.NewProtoCodec(interfaceRegistry) - txCfg := tx.NewTxConfig(marshaler, tx.DefaultSignModes) + codec := codec.NewProtoCodec(interfaceRegistry) + txCfg := tx.NewTxConfig(codec, tx.DefaultSignModes) return params.EncodingConfig{ InterfaceRegistry: interfaceRegistry, - Marshaler: marshaler, + Codec: codec, TxConfig: txCfg, Amino: amino, } diff --git a/app/export.go b/app/export.go index db240d2..5fa4341 100644 --- a/app/export.go +++ b/app/export.go @@ -2,10 +2,11 @@ package app import ( "encoding/json" - "fmt" - "log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + + storetypes "cosmossdk.io/store/types" + servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" @@ -21,7 +22,7 @@ func (app *App) ExportAppStateAndValidators( modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block - ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) + ctx := app.NewContextLegacy(true, tmproto.Header{Height: app.LastBlockHeight()}) // We export at last height + 1, because that's the height at which // Tendermint will start InitChain. @@ -31,7 +32,11 @@ func (app *App) ExportAppStateAndValidators( app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState := app.mm.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + genState, err := app.mm.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + if err != nil { + return servertypes.ExportedApp{}, err + } + appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err @@ -46,8 +51,7 @@ func (app *App) ExportAppStateAndValidators( }, err } -// prepForZeroHeightGenesis prepares for a fresh genesis -// +// prepare for fresh start at zero height // NOTE zero height genesis is a temporary feature which will be deprecated // in favour of export at a block height func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) { @@ -63,7 +67,7 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str for _, addr := range jailAllowedAddrs { _, err := sdk.ValAddressFromBech32(addr) if err != nil { - log.Fatal(err) + panic(err) } allowedAddrsMap[addr] = true } @@ -74,22 +78,41 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str /* Handle fee distribution state. */ // withdraw all validator commission - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) + err := app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valAddr, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + app.Logger().Error(err.Error(), "ValOperatorAddress", val.GetOperator()) + } + _, err = app.DistrKeeper.WithdrawValidatorCommission(ctx, valAddr) + if err != nil { + app.Logger().Error(err.Error(), "ValOperatorAddress", val.GetOperator()) + } return false }) + if err != nil { + panic(err) + } // withdraw all delegator rewards - dels := app.StakingKeeper.GetAllDelegations(ctx) + dels, err := app.StakingKeeper.GetAllDelegations(ctx) + if err != nil { + panic(err) + } for _, delegation := range dels { valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) if err != nil { panic(err) } - delAddr := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) + delAddr, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) + if err != nil { + panic(err) + } - _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) + _, err = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) + if err != nil { + panic(err) + } } // clear validator slash events @@ -103,18 +126,33 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str ctx = ctx.WithBlockHeight(0) // reinitialize all validators - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + err = app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) - feePool := app.DistrKeeper.GetFeePool(ctx) + valAddr, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } + scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valAddr) + if err != nil { + panic(err) + } + feePool, err := app.DistrKeeper.FeePool.Get(ctx) + if err != nil { + panic(err) + } feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) - app.DistrKeeper.SetFeePool(ctx, feePool) - - if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()); err != nil { + err = app.DistrKeeper.FeePool.Set(ctx, feePool) + if err != nil { + panic(err) + } + if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, valAddr); err != nil { panic(err) } return false }) + if err != nil { + panic(err) + } // reinitialize all delegations for _, del := range dels { @@ -122,16 +160,15 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str if err != nil { panic(err) } - delAddr := sdk.MustAccAddressFromBech32(del.DelegatorAddress) - + delAddr, err := sdk.AccAddressFromBech32(del.DelegatorAddress) + if err != nil { + panic(err) + } if err := app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr); err != nil { - // never called as BeforeDelegationCreated always returns nil - panic(fmt.Errorf("error while incrementing period: %w", err)) + panic(err) } - if err := app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr); err != nil { - // never called as AfterDelegationModified always returns nil - panic(fmt.Errorf("error while creating a new delegation period record: %w", err)) + panic(err) } } @@ -141,64 +178,82 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str /* Handle staking state. */ // iterate through redelegations, reset creation height - app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { + err = app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { for i := range red.Entries { red.Entries[i].CreationHeight = 0 } - app.StakingKeeper.SetRedelegation(ctx, red) + if err := app.StakingKeeper.SetRedelegation(ctx, red); err != nil { + panic(err) + } return false }) + if err != nil { + panic(err) + } // iterate through unbonding delegations, reset creation height - app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { + err = app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { for i := range ubd.Entries { ubd.Entries[i].CreationHeight = 0 } - app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + if err := app.StakingKeeper.SetUnbondingDelegation(ctx, ubd); err != nil { + panic(err) + } return false }) + if err != nil { + panic(err) + } // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. store := ctx.KVStore(app.GetKey(stakingtypes.StoreKey)) - iter := sdk.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) - counter := int16(0) + iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) - for ; iter.Valid(); iter.Next() { - addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) - validator, found := app.StakingKeeper.GetValidator(ctx, addr) - if !found { - panic("expected validator, not found") - } + counter := int16(0) - validator.UnbondingHeight = 0 - if applyAllowedAddrs && !allowedAddrsMap[addr.String()] { - validator.Jailed = true + // Closure to ensure iterator doesn't leak. + func() { + defer iter.Close() + for ; iter.Valid(); iter.Next() { + addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) + validator, err := app.StakingKeeper.GetValidator(ctx, addr) + if err != nil { + panic("expected validator, not found") + } + + validator.UnbondingHeight = 0 + if applyAllowedAddrs && !allowedAddrsMap[addr.String()] { + validator.Jailed = true + } + + if err = app.StakingKeeper.SetValidator(ctx, validator); err != nil { + panic(err) + } + + counter++ } + }() - app.StakingKeeper.SetValidator(ctx, validator) - counter++ - } - - if err := iter.Close(); err != nil { - app.Logger().Error("error while closing the key-value store reverse prefix iterator: ", err) - return - } - - _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + _, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { - log.Fatal(err) + panic(err) } /* Handle slashing state. */ // reset start height on signing infos - app.SlashingKeeper.IterateValidatorSigningInfos( + err = app.SlashingKeeper.IterateValidatorSigningInfos( ctx, func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) { info.StartHeight = 0 - app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info) + if err = app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info); err != nil { + panic(err) + } return false }, ) + if err != nil { + panic(err) + } } diff --git a/app/params/encoding.go b/app/params/encoding.go index 3d634ab..8ff9ea0 100644 --- a/app/params/encoding.go +++ b/app/params/encoding.go @@ -10,7 +10,7 @@ import ( // This is provided for compatibility between protobuf and amino implementations. type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry - Marshaler codec.Codec + Codec codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino } diff --git a/app/simulation_test.go b/app/simulation_test.go index 4992544..f3655a7 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -10,23 +10,21 @@ import ( "testing" "time" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + evidencetypes "cosmossdk.io/x/evidence/types" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" - storetypes "github.com/cosmos/cosmos-sdk/store/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - sdk "github.com/cosmos/cosmos-sdk/types" simulationtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -34,6 +32,7 @@ import ( simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "github.com/stretchr/testify/require" "github.com/sagaxyz/ssc/app" @@ -92,10 +91,6 @@ func BenchmarkSimulation(b *testing.B) { db, nil, true, - map[int64]bool{}, - app.DefaultNodeHome, - 0, - app.MakeEncodingConfig(), appOptions, baseapp.SetChainID(config.ChainID), ) @@ -155,7 +150,7 @@ func TestAppStateDeterminism(t *testing.T) { for j := 0; j < numTimesToRunPerSeed; j++ { var logger log.Logger if simcli.FlagVerboseValue { - logger = log.TestingLogger() + logger = log.NewTestLogger(t) } else { logger = log.NewNopLogger() } @@ -168,12 +163,7 @@ func TestAppStateDeterminism(t *testing.T) { db, nil, true, - map[int64]bool{}, - app.DefaultNodeHome, - simcli.FlagPeriodValue, - app.MakeEncodingConfig(), appOptions, - fauxMerkleModeOpt, baseapp.SetChainID(chainID), ) @@ -246,10 +236,6 @@ func TestAppImportExport(t *testing.T) { db, nil, true, - map[int64]bool{}, - app.DefaultNodeHome, - 0, - app.MakeEncodingConfig(), appOptions, baseapp.SetChainID(config.ChainID), ) @@ -307,10 +293,6 @@ func TestAppImportExport(t *testing.T) { newDB, nil, true, - map[int64]bool{}, - app.DefaultNodeHome, - 0, - app.MakeEncodingConfig(), appOptions, baseapp.SetChainID(config.ChainID), ) @@ -331,8 +313,8 @@ func TestAppImportExport(t *testing.T) { } }() - ctxA := bApp.NewContext(true, tmproto.Header{Height: bApp.LastBlockHeight()}) - ctxB := newApp.NewContext(true, tmproto.Header{Height: bApp.LastBlockHeight()}) + ctxA := bApp.NewContextLegacy(true, tmproto.Header{Height: bApp.LastBlockHeight()}) + ctxB := newApp.NewContextLegacy(true, tmproto.Header{Height: bApp.LastBlockHeight()}) newApp.ModuleManager().InitGenesis(ctxB, bApp.AppCodec(), genesisState) newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) @@ -362,7 +344,7 @@ func TestAppImportExport(t *testing.T) { storeA := ctxA.KVStore(skp.A) storeB := ctxB.KVStore(skp.B) - failedKVAs, failedKVBs := sdk.DiffKVStores(storeA, storeB, skp.Prefixes) + failedKVAs, failedKVBs := simtestutil.DiffKVStores(storeA, storeB, skp.Prefixes) require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare") fmt.Printf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), skp.A, skp.B) @@ -400,12 +382,7 @@ func TestAppSimulationAfterImport(t *testing.T) { db, nil, true, - map[int64]bool{}, - app.DefaultNodeHome, - 0, - app.MakeEncodingConfig(), appOptions, - fauxMerkleModeOpt, baseapp.SetChainID(config.ChainID), ) require.Equal(t, app.Name, bApp.Name()) @@ -467,17 +444,12 @@ func TestAppSimulationAfterImport(t *testing.T) { newDB, nil, true, - map[int64]bool{}, - app.DefaultNodeHome, - 0, - app.MakeEncodingConfig(), appOptions, - fauxMerkleModeOpt, baseapp.SetChainID(config.ChainID), ) require.Equal(t, app.Name, bApp.Name()) - newApp.InitChain(abci.RequestInitChain{ + newApp.InitChain(&abci.RequestInitChain{ ChainId: config.ChainID, AppStateBytes: exported.AppState, }) diff --git a/app/upgrades/v1/upgrades.go b/app/upgrades/v1/upgrades.go new file mode 100644 index 0000000..e4e5ac8 --- /dev/null +++ b/app/upgrades/v1/upgrades.go @@ -0,0 +1,18 @@ +package v1 + +import ( + "context" + + upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/types/module" + consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" +) + +const Name = "0.x-to-1" //TODO replace x with the actual number + +func UpgradeHandler(mm *module.Manager, configurator module.Configurator, paramsKeeper paramskeeper.Keeper, consensusKeeper *consensuskeeper.Keeper) upgradetypes.UpgradeHandler { + return func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + return mm.RunMigrations(ctx, configurator, vm) + } +} diff --git a/cmd/sscd/cmd/config.go b/cmd/sscd/cmd/config.go index 0912b3b..1b78955 100644 --- a/cmd/sscd/cmd/config.go +++ b/cmd/sscd/cmd/config.go @@ -2,22 +2,22 @@ package cmd import ( sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/sagaxyz/ssc/app" ) -func initSDKConfig() { - // Set prefixes - accountPubKeyPrefix := app.AccountAddressPrefix + "pub" - validatorAddressPrefix := app.AccountAddressPrefix + "valoper" - validatorPubKeyPrefix := app.AccountAddressPrefix + "valoperpub" - consNodeAddressPrefix := app.AccountAddressPrefix + "valcons" - consNodePubKeyPrefix := app.AccountAddressPrefix + "valconspub" +const ( + Bech32MainPrefix = "saga" + + // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address + Bech32PrefixAccAddr = Bech32MainPrefix + Bech32PrefixAccPub = Bech32MainPrefix + sdk.PrefixPublic + Bech32PrefixValAddr = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixOperator + Bech32PrefixValPub = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic + Bech32PrefixConsAddr = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixConsensus + Bech32PrefixConsPub = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic +) - // Set and seal config - config := sdk.GetConfig() - config.SetBech32PrefixForAccount(app.AccountAddressPrefix, accountPubKeyPrefix) - config.SetBech32PrefixForValidator(validatorAddressPrefix, validatorPubKeyPrefix) - config.SetBech32PrefixForConsensusNode(consNodeAddressPrefix, consNodePubKeyPrefix) - config.Seal() +func SetBech32Prefixes(config *sdk.Config) { + config.SetBech32PrefixForAccount(Bech32PrefixAccAddr, Bech32PrefixAccPub) + config.SetBech32PrefixForValidator(Bech32PrefixValAddr, Bech32PrefixValPub) + config.SetBech32PrefixForConsensusNode(Bech32PrefixConsAddr, Bech32PrefixConsPub) } diff --git a/cmd/sscd/cmd/genaccounts.go b/cmd/sscd/cmd/genaccounts.go index d5ec653..740e00c 100644 --- a/cmd/sscd/cmd/genaccounts.go +++ b/cmd/sscd/cmd/genaccounts.go @@ -100,7 +100,10 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa baseAccount := authtypes.NewBaseAccount(addr, nil, 0, 0) if !vestingAmt.IsZero() { - baseVestingAccount := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) + baseVestingAccount, err := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) + if err != nil { + return err + } if (balances.Coins.IsZero() && !baseVestingAccount.OriginalVesting.IsZero()) || baseVestingAccount.OriginalVesting.IsAnyGT(balances.Coins) { diff --git a/cmd/sscd/cmd/root.go b/cmd/sscd/cmd/root.go index 59609dd..e408666 100644 --- a/cmd/sscd/cmd/root.go +++ b/cmd/sscd/cmd/root.go @@ -4,15 +4,13 @@ import ( "errors" "io" "os" - "path/filepath" "strings" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" + confixcmd "cosmossdk.io/tools/confix/cmd" tmcfg "github.com/cometbft/cometbft/config" tmcli "github.com/cometbft/cometbft/libs/cli" - "github.com/cometbft/cometbft/libs/log" - tmtypes "github.com/cometbft/cometbft/types" - "github.com/cosmos/cosmos-sdk/baseapp" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" @@ -22,21 +20,15 @@ import ( "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/snapshots" - snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" - "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" - "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" sagaserver "github.com/sagaxyz/saga-sdk/server" - "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/pflag" + "github.com/spf13/viper" // this line is used by starport scaffolding # root/moduleImport @@ -46,9 +38,35 @@ import ( // NewRootCmd creates a new root command for a Cosmos SDK application func NewRootCmd() (*cobra.Command, appparams.EncodingConfig) { - encodingConfig := app.MakeEncodingConfig() + tempDir, err := os.MkdirTemp("", ".ssc") + if err != nil { + panic(err) + } + defer os.RemoveAll(tempDir) + + initAppOpts := viper.New() + initAppOpts.Set(flags.FlagHome, tempDir) + tempApp := app.New( + log.NewNopLogger(), + dbm.NewMemDB(), + nil, + true, + initAppOpts, + ) + defer func() { + if err := tempApp.Close(); err != nil { + panic(err) + } + }() + encodingConfig := appparams.EncodingConfig{ + InterfaceRegistry: tempApp.InterfaceRegistry(), + Codec: tempApp.AppCodec(), + TxConfig: tempApp.TxConfig(), + Amino: tempApp.LegacyAmino(), + } + initClientCtx := client.Context{}. - WithCodec(encodingConfig.Marshaler). + WithCodec(encodingConfig.Codec). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). @@ -91,6 +109,15 @@ func NewRootCmd() (*cobra.Command, appparams.EncodingConfig) { flags.FlagKeyringBackend: "test", }) + autoCliOpts := tempApp.AutoCliOpts() + initClientCtx, _ = config.ReadDefaultValuesFromDefaultClientConfig(initClientCtx) + //autoCliOpts.Keyring, _ = keyring.NewAutoCLIKeyring(initClientCtx.Keyring) + autoCliOpts.ClientCtx = initClientCtx + + if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { + panic(err) + } + return rootCmd, encodingConfig } @@ -105,49 +132,35 @@ func initRootCmd( rootCmd *cobra.Command, encodingConfig appparams.EncodingConfig, ) { - // Set config - initSDKConfig() - - gentxModule := app.ModuleBasics[genutiltypes.ModuleName].(genutil.AppModuleBasic) + cfg := sdk.GetConfig() + cfg.Seal() rootCmd.PersistentFlags().String(sagaserver.FlagJsonLogFile, "", "JSON-formatted log file") rootCmd.AddCommand( genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), - genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, gentxModule.GenTxValidator), - genutilcli.MigrateGenesisCmd(), - genutilcli.GenTxCmd( - app.ModuleBasics, - encodingConfig.TxConfig, - banktypes.GenesisBalancesIterator{}, - app.DefaultNodeHome, - ), - genutilcli.ValidateGenesisCmd(app.ModuleBasics), + genutilcli.Commands(encodingConfig.TxConfig, app.ModuleBasics, app.DefaultNodeHome), AddGenesisAccountCmd(app.DefaultNodeHome), tmcli.NewCompletionCmd(rootCmd, true), debug.Cmd(), - config.Cmd(), + confixcmd.ConfigCommand(), // this line is used by starport scaffolding # root/commands ) - a := appCreator{ - encodingConfig, - } - // add server commands server.AddCommands( rootCmd, app.DefaultNodeHome, - a.newApp, - a.appExport, + newApp, + appExport, addModuleInitFlags, ) // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( - rpc.StatusCommand(), + server.StatusCommand(), queryCommand(), txCommand(), - keys.Commands(app.DefaultNodeHome), + keys.Commands(), ) } @@ -163,9 +176,9 @@ func queryCommand() *cobra.Command { } cmd.AddCommand( - authcmd.GetAccountCmd(), + //authcmd.GetAccountCmd(), rpc.ValidatorCommand(), - rpc.BlockCommand(), + //rpc.BlockCommand(), authcmd.QueryTxsByEventsCmd(), authcmd.QueryTxCmd(), ) @@ -224,11 +237,25 @@ func overwriteFlagDefaults(c *cobra.Command, defaults map[string]string) { } } +// newApp creates the application +func newApp( + logger log.Logger, + db dbm.DB, + traceStore io.Writer, + appOpts servertypes.AppOptions, +) servertypes.Application { + baseappOptions := server.DefaultBaseappOptions(appOpts) + return app.New( + logger, db, traceStore, true, + appOpts, + baseappOptions..., + ) +} + +/*// newApp creates a new Cosmos SDK app type appCreator struct { encodingConfig appparams.EncodingConfig } - -// newApp creates a new Cosmos SDK app func (a appCreator) newApp( logger log.Logger, db dbm.DB, @@ -278,6 +305,10 @@ func (a appCreator) newApp( cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)), ) + if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { + panic(err) + } + return app.New( logger, db, @@ -301,10 +332,9 @@ func (a appCreator) newApp( baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagDisableIAVLFastNode))), baseapp.SetChainID(chainID), ) -} +}*/ -// appExport creates a new simapp (optionally at a given height) -func (a appCreator) appExport( +func appExport( logger log.Logger, db dbm.DB, traceStore io.Writer, @@ -324,10 +354,6 @@ func (a appCreator) appExport( db, traceStore, height == -1, // -1: no height provided - map[int64]bool{}, - homePath, - uint(1), - a.encodingConfig, appOpts, ) @@ -363,10 +389,8 @@ func initAppConfig() (string, interface{}) { // - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their // own app.toml to override, or use this default value. // - // In simapp, we set the min gas prices to 0. srvCfg.MinGasPrices = "0tsaga,0stake" srvCfg.GRPC.Address = "0.0.0.0:9090" - srvCfg.GRPCWeb.Address = "0.0.0.0:9091" customAppConfig := CustomAppConfig{ Config: *srvCfg, } diff --git a/cmd/sscd/main.go b/cmd/sscd/main.go index 3b1e229..d9bd00a 100644 --- a/cmd/sscd/main.go +++ b/cmd/sscd/main.go @@ -1,24 +1,23 @@ package main import ( + "fmt" "os" - "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sagaxyz/ssc/app" "github.com/sagaxyz/ssc/cmd/sscd/cmd" ) func main() { + cfg := sdk.GetConfig() + cmd.SetBech32Prefixes(cfg) + rootCmd, _ := cmd.NewRootCmd() if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { - switch e := err.(type) { - case server.ErrorCode: - os.Exit(e.Code) - - default: - os.Exit(1) - } + fmt.Fprintln(rootCmd.OutOrStderr(), err) + os.Exit(1) } } diff --git a/go.mod b/go.mod index f99ad0f..cc43817 100644 --- a/go.mod +++ b/go.mod @@ -1,63 +1,72 @@ module github.com/sagaxyz/ssc -go 1.21.1 +go 1.22.2 -toolchain go1.21.11 +toolchain go1.22.5 require ( - cosmossdk.io/api v0.3.1 + cosmossdk.io/api v0.7.5 + cosmossdk.io/client/v2 v2.0.0-beta.1 + cosmossdk.io/core v0.11.0 cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.3.1 cosmossdk.io/math v1.3.0 - github.com/cometbft/cometbft v0.37.6 - github.com/cometbft/cometbft-db v0.11.0 + cosmossdk.io/store v1.1.0 + cosmossdk.io/tools/confix v0.1.1 + cosmossdk.io/x/evidence v0.1.0 + cosmossdk.io/x/feegrant v0.1.0 + cosmossdk.io/x/tx v0.13.3 + cosmossdk.io/x/upgrade v0.1.1 + github.com/cometbft/cometbft v0.38.9 + github.com/cometbft/cometbft-db v0.12.0 + github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.47.11 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.4.0 - github.com/cosmos/interchain-security/v4 v4.1.1 + github.com/cosmos/cosmos-sdk v0.50.8 + github.com/cosmos/gogoproto v1.5.0 + github.com/cosmos/ibc-go/modules/capability v1.0.0 + github.com/cosmos/ibc-go/v8 v8.3.2 + github.com/cosmos/interchain-security/v5 v5.0.0 github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 - github.com/gorilla/mux v1.8.0 + github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 github.com/ignite/cli v0.27.2 - github.com/sagaxyz/saga-sdk v0.6.0 + github.com/sagaxyz/saga-sdk v0.7.0 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 + github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de - google.golang.org/grpc v1.63.2 + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 + google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 + google.golang.org/grpc v1.64.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 ) require ( - cloud.google.com/go v0.112.0 // indirect - cloud.google.com/go/compute v1.24.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/iam v1.1.6 // indirect - cloud.google.com/go/storage v1.36.0 // indirect - cosmossdk.io/core v0.5.1 // indirect + cloud.google.com/go/storage v1.38.0 // indirect + cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/log v1.3.1 // indirect - cosmossdk.io/tools/rosetta v0.2.1 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect - github.com/DataDog/zstd v1.4.5 // indirect - github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/DataDog/datadog-go v4.8.3+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect - github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.11.1 // indirect @@ -65,138 +74,138 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect - github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/iavl v1.1.2 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect - github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/creachadair/taskgroup v0.4.2 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/creachadair/atomicfile v0.3.1 // indirect + github.com/creachadair/tomledit v0.0.24 // indirect + github.com/danieljoos/wincred v1.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect - github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect - github.com/ethereum/go-ethereum v1.10.22 // indirect + github.com/emicklei/dot v1.6.1 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/getsentry/sentry-go v0.23.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect + github.com/google/flatbuffers v1.12.1 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect + github.com/gorilla/handlers v1.5.2 // indirect + github.com/gorilla/websocket v1.5.1 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/gtank/merlin v0.1.1 // indirect - github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.4 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hdevalence/ed25519consensus v0.2.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect - github.com/rakyll/statik v0.1.7 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.52.2 // indirect + github.com/prometheus/procfs v0.13.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/cors v1.9.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/viper v1.18.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect - go.opentelemetry.io/otel v1.22.0 // indirect - go.opentelemetry.io/otel/metric v1.22.0 // indirect - go.opentelemetry.io/otel/trace v1.22.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.9.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.20.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect + golang.org/x/text v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.162.0 // indirect - google.golang.org/appengine v1.6.8 // indirect + golang.org/x/tools v0.20.0 // indirect + google.golang.org/api v0.171.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - nhooyr.io/websocket v1.8.6 // indirect + gotest.tools/v3 v3.5.1 // indirect + nhooyr.io/websocket v1.8.10 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - -replace golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // https://github.com/cosmos/cosmos-sdk/issues/20159#issuecomment-2072925746 diff --git a/go.sum b/go.sum index 5e280d9..46aa72b 100644 --- a/go.sum +++ b/go.sum @@ -30,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= -cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -68,10 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= -cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -171,8 +169,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= -cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -184,10 +182,14 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= -cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= -cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= -cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= +cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -196,30 +198,42 @@ cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= -cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= -cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= +cosmossdk.io/tools/confix v0.1.1 h1:aexyRv9+y15veH3Qw16lxQwo+ki7r2I+g0yNTEFEQM8= +cosmossdk.io/tools/confix v0.1.1/go.mod h1:nQVvP1tHsGXS83PonPVWJtSbddIqyjEw99L4M3rPJyQ= +cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= +cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= +cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= +cosmossdk.io/x/evidence v0.1.0/go.mod h1:hTaiiXsoiJ3InMz1uptgF0BnGqROllAN8mwisOMMsfw= +cosmossdk.io/x/feegrant v0.1.0 h1:c7s3oAq/8/UO0EiN1H5BIjwVntujVTkYs35YPvvrdQk= +cosmossdk.io/x/feegrant v0.1.0/go.mod h1:4r+FsViJRpcZif/yhTn+E0E6OFfg4n0Lx+6cCtnZElU= +cosmossdk.io/x/tx v0.13.3 h1:Ha4mNaHmxBc6RMun9aKuqul8yHiL78EKJQ8g23Zf73g= +cosmossdk.io/x/tx v0.13.3/go.mod h1:I8xaHv0rhUdIvIdptKIqzYy27+n2+zBVaxO6fscFhys= +cosmossdk.io/x/upgrade v0.1.1 h1:aoPe2gNvH+Gwt/Pgq3dOxxQVU3j5P6Xf+DaUJTDZATc= +cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOcQy0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= -github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= +github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= -github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= @@ -236,18 +250,16 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= -github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= +github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -257,28 +269,27 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/btcsuite/btcd v0.23.3 h1:4KH/JKy9WiCd+iUS9Mu0Zp7Dnj17TGdKrg9xc/FGj24= -github.com/btcsuite/btcd v0.23.3/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -302,8 +313,6 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -320,57 +329,53 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= -github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.6 h1:2BSD0lGPbcIyRd99Pf1zH0Sa8o0pbfqVWEDbZ4Ec2Uc= -github.com/cometbft/cometbft v0.37.6/go.mod h1:5FRkFil9uagHZogIX9x8z51c3GIPpQmdIN8Mq46HfzY= -github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= -github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= -github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= -github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= +github.com/cometbft/cometbft v0.38.9 h1:cJBJBG0mPKz+sqelCi/hlfZjadZQGdDNnu6YQ1ZsUHQ= +github.com/cometbft/cometbft v0.38.9/go.mod h1:xOoGZrtUT+A5izWfHSJgl0gYZUE7lu7Z2XIS1vWG/QQ= +github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= +github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.47.11 h1:0Qx7eORw0RJqPv+mvDuU8NQ1LV3nJJKJnPoYblWHolc= -github.com/cosmos/cosmos-sdk v0.47.11/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/cosmos-sdk v0.50.8 h1:2UJHssUaGHTl4/dFp8xyREKAnfiRU6VVfqtKG9n8w5g= +github.com/cosmos/cosmos-sdk v0.50.8/go.mod h1:Zb+DgHtiByNwgj71IlJBXwOq6dLhtyAq3AgqpXm/jHo= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= -github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.4.0 h1:8FqYMptvksgMvlbN4UW9jFxTXzsPyfAzEZurujXac8M= -github.com/cosmos/ibc-go/v7 v7.4.0/go.mod h1:L/KaEhzV5TGUCTfGysVgMBQtl5Dm7hHitfpk+GIeoAo= +github.com/cosmos/gogoproto v1.5.0 h1:SDVwzEqZDDBoslaeZg+dGE55hdzHfgUA40pEanMh52o= +github.com/cosmos/gogoproto v1.5.0/go.mod h1:iUM31aofn3ymidYG6bUR5ZFrk+Om8p5s754eMUcyp8I= +github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= +github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= +github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= +github.com/cosmos/ibc-go/v8 v8.3.2 h1:8X1oHHKt2Bh9hcExWS89rntLaCKZp2EjFTUSxKlPhGI= +github.com/cosmos/ibc-go/v8 v8.3.2/go.mod h1:WVVIsG39jGrF9Cjggjci6LzySyWGloz194sjTxiGNIE= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/interchain-security/v4 v4.1.1 h1:d9HiSI/onCNArtmrY8hCMUwjNkwL02Enj9Rs9KjwXGs= -github.com/cosmos/interchain-security/v4 v4.1.1/go.mod h1:12dOsysp0t6ISq6ck5PPbleyEMPTVcfxMTmz0pvGLJ8= -github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= -github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= -github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= -github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cosmos/interchain-security/v5 v5.0.0 h1:iwHu1nFbXuYfa13isEgm6hkHU+2t/t56YjcfyP3PnQA= +github.com/cosmos/interchain-security/v5 v5.0.0/go.mod h1:h/RkwOppo5AJj+1pkQyfjqU1MPdpohD/S6oEeAXpGZY= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= -github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= +github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= +github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= +github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= +github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= +github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -381,9 +386,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etly github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= -github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= +github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -404,6 +408,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -415,12 +421,10 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= -github.com/ethereum/go-ethereum v1.10.22 h1:HbEgsDo1YTGIf4KB/NNpn+XH+PiNJXUZ9ksRxiqWyMc= -github.com/ethereum/go-ethereum v1.10.22/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -433,22 +437,23 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= -github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -463,24 +468,13 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -495,8 +489,8 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -535,12 +529,15 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= +github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -607,38 +604,33 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/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/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 h1:gDLXvp5S9izjldquuoAhDzccbskOL6tDC5jMSyx3zxE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2/go.mod h1:7pdNwVWBBHGiCxa9lAszqCJMbfTISJ7oMftp8+UGV08= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -648,11 +640,17 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -669,22 +667,28 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= -github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= +github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ignite/cli v0.27.2 h1:NFzZqQrt8vhRQeStSvAMhpq65ag+lEAVP5ulw7cu3Y4= @@ -695,8 +699,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -711,8 +715,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -724,10 +726,9 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -739,28 +740,28 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= @@ -768,12 +769,7 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -790,12 +786,9 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -813,8 +806,12 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -825,8 +822,8 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.20.2 h1:8uQq0zMgLEfa0vRrrBgaJF2gyW9Da9BmfGV+OyUzfkY= -github.com/onsi/gomega v1.20.2/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= +github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -851,13 +848,12 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -878,34 +874,32 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -913,20 +907,19 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= -github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagaxyz/saga-sdk v0.6.0 h1:2SmiAtvgiJlDcqesxrWrLWpykse96wggl1++Sk/akYE= -github.com/sagaxyz/saga-sdk v0.6.0/go.mod h1:FwzeVewhFhhOTwvYg5V7V+4L/7gInpqo/nMUQDEkK60= +github.com/sagaxyz/saga-sdk v0.7.0 h1:RWzG+DVEvK+VPPUwEMXujtEC5RDMzyo8qCtPtiO8uJc= +github.com/sagaxyz/saga-sdk v0.7.0/go.mod h1:qsRwD41VDE8vAeqsa4hzZJjuEaePWQSCKJREwVKfLko= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= @@ -949,24 +942,16 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -985,6 +970,7 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= @@ -996,33 +982,18 @@ 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/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= -github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= -github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef h1:wHSqTBrZW24CsNJDfeh9Ex6Pm0Rcpc7qrgKBiL44vF4= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1034,8 +1005,8 @@ github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1048,50 +1019,62 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= -go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= -go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= -go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= -go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= -go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= -go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU= go.uber.org/mock v0.2.0/go.mod h1:J0y0rp9L3xiff1+ZBfKxlC1fz2+aO16tw0tsDOixfuM= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1104,18 +1087,20 @@ golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPI golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.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.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1175,8 +1160,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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= @@ -1202,8 +1187,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1218,8 +1203,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1228,19 +1213,19 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1287,9 +1272,10 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1313,13 +1299,13 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= 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= @@ -1329,10 +1315,9 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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= @@ -1346,6 +1331,7 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1354,9 +1340,12 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1369,6 +1358,7 @@ golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapK 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= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1396,9 +1386,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= 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= @@ -1406,8 +1395,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1457,8 +1447,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= -google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1467,8 +1457,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1577,10 +1565,10 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 h1:W5Xj/70xIA4x60O/IFyXivR5MGqblAb8R3w26pnD6No= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8/go.mod h1:vPrPUTsDCYxXWjP7clS81mZ6/803D8K4iM9Ma27VKas= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 h1:mxSlqyb8ZAHsYDCfiXN1EDdNTdvjUJSLY+OnAUtYNYA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1622,8 +1610,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1640,8 +1628,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1674,7 +1662,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1687,8 +1674,9 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= +nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/proto/ssc/billing/tx.proto b/proto/ssc/billing/tx.proto index 844c7d0..4cdb041 100644 --- a/proto/ssc/billing/tx.proto +++ b/proto/ssc/billing/tx.proto @@ -1,12 +1,15 @@ syntax = "proto3"; package ssc.billing; +import "cosmos/msg/v1/msg.proto"; + // this line is used by starport scaffolding # proto/tx/import option go_package = "github.com/sagaxyz/ssc/x/billing/types"; // Msg defines the Msg service. service Msg { + option (cosmos.msg.v1.service) = true; // this line is used by starport scaffolding # proto/tx/rpc } diff --git a/proto/ssc/chainlet/genesis.proto b/proto/ssc/chainlet/genesis.proto index 27e73fa..c8fee7a 100644 --- a/proto/ssc/chainlet/genesis.proto +++ b/proto/ssc/chainlet/genesis.proto @@ -1,8 +1,10 @@ syntax = "proto3"; + package ssc.chainlet; import "gogoproto/gogo.proto"; import "ssc/chainlet/params.proto"; + // this line is used by starport scaffolding # genesis/proto/import option go_package = "github.com/sagaxyz/ssc/x/chainlet/types"; diff --git a/proto/ssc/chainlet/query.proto b/proto/ssc/chainlet/query.proto index 5e3a3d9..60ff1d0 100644 --- a/proto/ssc/chainlet/query.proto +++ b/proto/ssc/chainlet/query.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package ssc.chainlet; import "gogoproto/gogo.proto"; @@ -7,6 +8,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "ssc/chainlet/params.proto"; import "ssc/chainlet/chainlet_stack.proto"; import "ssc/chainlet/chainlet.proto"; + // this line is used by starport scaffolding # 1 option go_package = "github.com/sagaxyz/ssc/x/chainlet/types"; diff --git a/proto/ssc/chainlet/tx.proto b/proto/ssc/chainlet/tx.proto index 8434ab9..d816e79 100644 --- a/proto/ssc/chainlet/tx.proto +++ b/proto/ssc/chainlet/tx.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package ssc.chainlet; import "gogoproto/gogo.proto"; +import "cosmos/msg/v1/msg.proto"; import "ssc/chainlet/chainlet_params.proto"; import "ssc/chainlet/chainlet_stack.proto"; @@ -12,6 +13,7 @@ option go_package = "github.com/sagaxyz/ssc/x/chainlet/types"; // Msg defines the Msg service. service Msg { + option (cosmos.msg.v1.service) = true; rpc CreateChainletStack(MsgCreateChainletStack) returns (MsgCreateChainletStackResponse); rpc LaunchChainlet(MsgLaunchChainlet) returns (MsgLaunchChainletResponse); @@ -24,6 +26,7 @@ service Msg { rpc UpgradeChainlet(MsgUpgradeChainlet) returns (MsgUpgradeChainletResponse); } message MsgCreateChainletStack { + option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string displayName = 2; string description = 3; @@ -36,6 +39,7 @@ message MsgCreateChainletStack { message MsgCreateChainletStackResponse {} message MsgLaunchChainlet { + option (cosmos.msg.v1.signer) = "creator"; string creator = 1; repeated string maintainers = 2; string chainletStackName = 3; @@ -50,6 +54,7 @@ message MsgLaunchChainlet { message MsgLaunchChainletResponse {} message MsgUpdateChainletStack { + option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string displayName = 2; string image = 3; @@ -60,6 +65,7 @@ message MsgUpdateChainletStack { message MsgUpdateChainletStackResponse {} message MsgDisableChainletStackVersion { + option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string displayName = 2; string version = 3; @@ -68,6 +74,7 @@ message MsgDisableChainletStackVersionResponse {} // this line is used by starport scaffolding # proto/tx/message message MsgUpgradeChainlet { + option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string chainId = 2; string stackVersion = 3; diff --git a/proto/ssc/escrow/chainlet_account.proto b/proto/ssc/escrow/chainlet_account.proto index 814f76f..9f9a940 100644 --- a/proto/ssc/escrow/chainlet_account.proto +++ b/proto/ssc/escrow/chainlet_account.proto @@ -11,7 +11,7 @@ message ChainletAccount { cosmos.base.v1beta1.Coin balance = 2 [ (gogoproto.nullable) = false ]; string shares = 3 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; map funders = 4 [ (gogoproto.nullable) = false ]; @@ -20,7 +20,7 @@ message ChainletAccount { message Funder { string shares = 1 [ (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; -} \ No newline at end of file +} diff --git a/proto/ssc/escrow/tx.proto b/proto/ssc/escrow/tx.proto index 180df02..1521210 100644 --- a/proto/ssc/escrow/tx.proto +++ b/proto/ssc/escrow/tx.proto @@ -1,18 +1,22 @@ syntax = "proto3"; package ssc.escrow; +import "cosmos/msg/v1/msg.proto"; + // this line is used by starport scaffolding # proto/tx/import option go_package = "github.com/sagaxyz/ssc/x/escrow/types"; // Msg defines the Msg service. service Msg { + option (cosmos.msg.v1.service) = true; rpc Deposit(MsgDeposit) returns (MsgDepositResponse); rpc Withdraw(MsgWithdraw) returns (MsgWithdrawResponse); // this line is used by starport scaffolding # proto/tx/rpc } message MsgDeposit { + option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string amount = 2; string chainId = 3; @@ -21,6 +25,7 @@ message MsgDeposit { message MsgDepositResponse {} message MsgWithdraw { + option (cosmos.msg.v1.signer) = "creator"; string creator = 1; string chainId = 2; } diff --git a/proto/ssc/peers/tx.proto b/proto/ssc/peers/tx.proto index 77de54f..a6e6e75 100644 --- a/proto/ssc/peers/tx.proto +++ b/proto/ssc/peers/tx.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package ssc.peers; import "gogoproto/gogo.proto"; +import "cosmos/msg/v1/msg.proto"; // this line is used by starport scaffolding # proto/tx/import @@ -10,10 +11,12 @@ option go_package = "github.com/sagaxyz/ssc/x/peers/types"; // Msg defines the Msg service. service Msg { + option (cosmos.msg.v1.service) = true; rpc SetPeers(MsgSetPeers) returns (MsgSetPeersResponse); // this line is used by starport scaffolding # proto/tx/rpc } message MsgSetPeers { + option (cosmos.msg.v1.signer) = "validator"; string validator = 1; string chainId = 2; repeated string peers = 3; diff --git a/proto/ssc/ssc/genesis.proto b/proto/ssc/ssc/genesis.proto deleted file mode 100644 index 1e9f4cd..0000000 --- a/proto/ssc/ssc/genesis.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; -package ssc.ssc; - -import "gogoproto/gogo.proto"; -import "ssc/ssc/params.proto"; - -option go_package = "github.com/sagaxyz/ssc/x/ssc/types"; - -// GenesisState defines the ssc module's genesis state. -message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/proto/ssc/ssc/params.proto b/proto/ssc/ssc/params.proto deleted file mode 100644 index 77ffc43..0000000 --- a/proto/ssc/ssc/params.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package ssc.ssc; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/sagaxyz/ssc/x/ssc/types"; - -// Params defines the parameters for the module. -message Params { option (gogoproto.goproto_stringer) = false; } diff --git a/proto/ssc/ssc/query.proto b/proto/ssc/ssc/query.proto deleted file mode 100644 index 9dc12f1..0000000 --- a/proto/ssc/ssc/query.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package ssc.ssc; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ssc/ssc/params.proto"; - -option go_package = "github.com/sagaxyz/ssc/x/ssc/types"; - -// Query defines the gRPC querier service. -service Query { - // Parameters queries the parameters of the module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/sagaxyz/ssc/ssc/params"; - } -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} \ No newline at end of file diff --git a/proto/ssc/ssc/tx.proto b/proto/ssc/ssc/tx.proto deleted file mode 100644 index 0364bce..0000000 --- a/proto/ssc/ssc/tx.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; -package ssc.ssc; - -option go_package = "github.com/sagaxyz/ssc/x/ssc/types"; - -// Msg defines the Msg service. -service Msg {} \ No newline at end of file diff --git a/testutil/keeper/billing.go b/testutil/keeper/billing.go index 42230b0..6c7754b 100644 --- a/testutil/keeper/billing.go +++ b/testutil/keeper/billing.go @@ -3,26 +3,28 @@ package keeper import ( "testing" - tmdb "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + tmdb "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" typesparams "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/stretchr/testify/require" + "cosmossdk.io/store/metrics" + "github.com/sagaxyz/ssc/x/billing/keeper" "github.com/sagaxyz/ssc/x/billing/types" - "github.com/stretchr/testify/require" ) func BillingKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { - storeKey := sdk.NewKVStoreKey(types.StoreKey) + storeKey := storetypes.NewKVStoreKey(types.StoreKey) memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) db := tmdb.NewMemDB() - stateStore := store.NewCommitMultiStore(db) + stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) stateStore.MountStoreWithDB(memStoreKey, storetypes.StoreTypeMemory, nil) require.NoError(t, stateStore.LoadLatestVersion()) @@ -39,7 +41,6 @@ func BillingKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { k := keeper.NewKeeper( cdc, storeKey, - memStoreKey, paramsSubspace, nil, nil, diff --git a/testutil/keeper/chainlet.go b/testutil/keeper/chainlet.go index 278789b..65c9909 100644 --- a/testutil/keeper/chainlet.go +++ b/testutil/keeper/chainlet.go @@ -2,28 +2,29 @@ package keeper import ( "testing" - - "github.com/sagaxyz/ssc/x/chainlet/keeper" - "github.com/sagaxyz/ssc/x/chainlet/types" - - tmdb "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + + tmdb "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" typesparams "github.com/cosmos/cosmos-sdk/x/params/types" + "cosmossdk.io/store/metrics" "github.com/stretchr/testify/require" + + "github.com/sagaxyz/ssc/x/chainlet/keeper" + "github.com/sagaxyz/ssc/x/chainlet/types" ) func ChainletKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { - storeKey := sdk.NewKVStoreKey(types.StoreKey) + storeKey := storetypes.NewKVStoreKey(types.StoreKey) memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) db := tmdb.NewMemDB() - stateStore := store.NewCommitMultiStore(db) + stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) stateStore.MountStoreWithDB(memStoreKey, storetypes.StoreTypeMemory, nil) require.NoError(t, stateStore.LoadLatestVersion()) @@ -40,7 +41,6 @@ func ChainletKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { k := keeper.NewKeeper( cdc, storeKey, - memStoreKey, paramsSubspace, nil, nil, diff --git a/testutil/keeper/epochs.go b/testutil/keeper/epochs.go index ca4a44a..e37d202 100644 --- a/testutil/keeper/epochs.go +++ b/testutil/keeper/epochs.go @@ -3,24 +3,26 @@ package keeper import ( "testing" - tmdb "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + tmdb "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/store/metrics" + "github.com/stretchr/testify/require" + "github.com/sagaxyz/ssc/x/epochs" "github.com/sagaxyz/ssc/x/epochs/keeper" "github.com/sagaxyz/ssc/x/epochs/types" - "github.com/stretchr/testify/require" ) func EpochsKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { - storeKey := sdk.NewKVStoreKey(types.StoreKey) + storeKey := storetypes.NewKVStoreKey(types.StoreKey) memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) db := tmdb.NewMemDB() - stateStore := store.NewCommitMultiStore(db) + stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) stateStore.MountStoreWithDB(memStoreKey, storetypes.StoreTypeMemory, nil) require.NoError(t, stateStore.LoadLatestVersion()) diff --git a/testutil/keeper/escrow.go b/testutil/keeper/escrow.go index e6f87eb..56230eb 100644 --- a/testutil/keeper/escrow.go +++ b/testutil/keeper/escrow.go @@ -3,26 +3,28 @@ package keeper import ( "testing" - tmdb "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + tmdb "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" typesparams "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/stretchr/testify/require" + "cosmossdk.io/store/metrics" + "github.com/sagaxyz/ssc/x/escrow/keeper" "github.com/sagaxyz/ssc/x/escrow/types" - "github.com/stretchr/testify/require" ) func EscrowKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { - storeKey := sdk.NewKVStoreKey(types.StoreKey) + storeKey := storetypes.NewKVStoreKey(types.StoreKey) memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) db := tmdb.NewMemDB() - stateStore := store.NewCommitMultiStore(db) + stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) stateStore.MountStoreWithDB(memStoreKey, storetypes.StoreTypeMemory, nil) require.NoError(t, stateStore.LoadLatestVersion()) @@ -40,7 +42,6 @@ func EscrowKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { k := keeper.NewKeeper( cdc, storeKey, - memStoreKey, paramsSubspace, nil, nil, diff --git a/testutil/keeper/peers.go b/testutil/keeper/peers.go index 59ff9dd..bfa50dd 100644 --- a/testutil/keeper/peers.go +++ b/testutil/keeper/peers.go @@ -3,27 +3,29 @@ package keeper import ( "testing" - "github.com/sagaxyz/ssc/x/peers/keeper" - "github.com/sagaxyz/ssc/x/peers/types" - - tmdb "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + "cosmossdk.io/store" + storetypes "cosmossdk.io/store/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmdb "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/store/metrics" typesparams "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/stretchr/testify/require" + + "github.com/sagaxyz/ssc/x/peers/keeper" + "github.com/sagaxyz/ssc/x/peers/types" + ) func PeersKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { - storeKey := sdk.NewKVStoreKey(types.StoreKey) + storeKey := storetypes.NewKVStoreKey(types.StoreKey) memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) db := tmdb.NewMemDB() - stateStore := store.NewCommitMultiStore(db) + stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) stateStore.MountStoreWithDB(memStoreKey, storetypes.StoreTypeMemory, nil) require.NoError(t, stateStore.LoadLatestVersion()) @@ -40,7 +42,6 @@ func PeersKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { k := keeper.New( cdc, storeKey, - memStoreKey, paramsSubspace, nil, ) diff --git a/testutil/keeper/ssc.go b/testutil/keeper/ssc.go deleted file mode 100644 index af5a2ad..0000000 --- a/testutil/keeper/ssc.go +++ /dev/null @@ -1,52 +0,0 @@ -package keeper - -import ( - "testing" - - tmdb "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - typesparams "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/sagaxyz/ssc/x/ssc/keeper" - "github.com/sagaxyz/ssc/x/ssc/types" - "github.com/stretchr/testify/require" -) - -func SscKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { - storeKey := sdk.NewKVStoreKey(types.StoreKey) - memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) - - db := tmdb.NewMemDB() - stateStore := store.NewCommitMultiStore(db) - stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) - stateStore.MountStoreWithDB(memStoreKey, storetypes.StoreTypeMemory, nil) - require.NoError(t, stateStore.LoadLatestVersion()) - - registry := codectypes.NewInterfaceRegistry() - cdc := codec.NewProtoCodec(registry) - - paramsSubspace := typesparams.NewSubspace(cdc, - types.Amino, - storeKey, - memStoreKey, - "SscParams", - ) - k := keeper.NewKeeper( - cdc, - storeKey, - memStoreKey, - paramsSubspace, - ) - - ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, log.NewNopLogger()) - - // Initialize params - k.SetParams(ctx, types.DefaultParams()) - - return k, ctx -} diff --git a/testutil/network/network.go b/testutil/network/network.go index e9f5937..494d988 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -5,13 +5,13 @@ import ( "testing" "time" - tmdb "github.com/cometbft/cometbft-db" + pruningtypes "cosmossdk.io/store/pruning/types" + dbm "github.com/cosmos/cosmos-db" tmrand "github.com/cometbft/cometbft/libs/rand" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" servertypes "github.com/cosmos/cosmos-sdk/server/types" - pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/testutil/network" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" @@ -54,7 +54,7 @@ func DefaultConfig() network.Config { chainID = "chain-" + tmrand.NewRand().Str(6) ) return network.Config{ - Codec: encoding.Marshaler, + Codec: encoding.Codec, TxConfig: encoding.TxConfig, LegacyAmino: encoding.Amino, InterfaceRegistry: encoding.InterfaceRegistry, @@ -62,20 +62,16 @@ func DefaultConfig() network.Config { AppConstructor: func(val network.ValidatorI) servertypes.Application { return app.New( val.GetCtx().Logger, - tmdb.NewMemDB(), + dbm.NewMemDB(), nil, true, - map[int64]bool{}, - val.GetCtx().Config.RootDir, - 0, - encoding, simtestutil.EmptyAppOptions{}, baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)), baseapp.SetMinGasPrices(val.GetAppConfig().MinGasPrices), baseapp.SetChainID(chainID), ) }, - GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Marshaler), + GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Codec), TimeoutCommit: 2 * time.Second, ChainID: chainID, NumValidators: 1, diff --git a/x/billing/client/cli/query_get_billing_history.go b/x/billing/client/cli/query_get_billing_history.go index 399904d..e74839f 100644 --- a/x/billing/client/cli/query_get_billing_history.go +++ b/x/billing/client/cli/query_get_billing_history.go @@ -1,16 +1,12 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/sagaxyz/ssc/x/billing/types" "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdGetBillingHistory() *cobra.Command { cmd := &cobra.Command{ Use: "get-billing-history [chain-id]", diff --git a/x/billing/client/cli/query_get_validator_payout_history.go b/x/billing/client/cli/query_get_validator_payout_history.go index a7e0488..c2ac66e 100644 --- a/x/billing/client/cli/query_get_validator_payout_history.go +++ b/x/billing/client/cli/query_get_validator_payout_history.go @@ -1,16 +1,12 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/sagaxyz/ssc/x/billing/types" "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdGetValidatorPayoutHistory() *cobra.Command { cmd := &cobra.Command{ Use: "get-validator-payout-history [validator-address]", diff --git a/x/billing/keeper/billing.go b/x/billing/keeper/billing.go index abb336a..babbb37 100644 --- a/x/billing/keeper/billing.go +++ b/x/billing/keeper/billing.go @@ -6,7 +6,7 @@ import ( cosmossdkerrors "cosmossdk.io/errors" "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sagaxyz/ssc/x/billing/types" chainlettypes "github.com/sagaxyz/ssc/x/chainlet/types" diff --git a/x/billing/keeper/grpc_query_get_billing_history.go b/x/billing/keeper/grpc_query_get_billing_history.go index 1461762..d1736d4 100644 --- a/x/billing/keeper/grpc_query_get_billing_history.go +++ b/x/billing/keeper/grpc_query_get_billing_history.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/sagaxyz/ssc/x/billing/types" diff --git a/x/billing/keeper/grpc_query_get_validator_payout_history.go b/x/billing/keeper/grpc_query_get_validator_payout_history.go index edb5d83..3de18c0 100644 --- a/x/billing/keeper/grpc_query_get_validator_payout_history.go +++ b/x/billing/keeper/grpc_query_get_validator_payout_history.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/sagaxyz/ssc/x/billing/types" diff --git a/x/billing/keeper/hooks.go b/x/billing/keeper/hooks.go index 4796f06..13b55a9 100644 --- a/x/billing/keeper/hooks.go +++ b/x/billing/keeper/hooks.go @@ -34,8 +34,8 @@ func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochN stack.Fees.EpochLength + " and we only bill for epoch length " + epochIdentifier) } } - // do this more efficiently later - chainlets, err := k.chainletkeeper.ListChainlets(ctxx, &chainlettypes.QueryListChainletsRequest{Pagination: &query.PageRequest{Limit: 5000}}) + + chainlets, err := k.chainletkeeper.ListChainlets(ctxx, &chainlettypes.QueryListChainletsRequest{Pagination: &query.PageRequest{Limit: k.chainletkeeper.GetParams(ctx).MaxChainlets}}) if err != nil { ctx.Logger().Error("could not list chainlets. Error: " + err.Error()) return cosmossdkerrors.Wrapf(types.ErrInternalFailure, "could not list chainlets. Error: "+err.Error()) @@ -115,7 +115,10 @@ func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumb return nil } - validators := k.stakingkeeper.GetValidators(ctx, 100) + validators, err := k.stakingkeeper.GetValidators(ctx, 100) + if err != nil { + return err + } numValidators := len(validators) // number of validators moduleAccount := k.accountkeeper.GetModuleAccount(ctx, "billing") // module account address for the billing module moduleAccountBalance := k.bankkeeper.GetAllBalances(ctx, moduleAccount.GetAddress()) diff --git a/x/billing/keeper/keeper.go b/x/billing/keeper/keeper.go index 169b015..920ea36 100644 --- a/x/billing/keeper/keeper.go +++ b/x/billing/keeper/keeper.go @@ -3,9 +3,9 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/sagaxyz/ssc/x/billing/types" @@ -15,7 +15,6 @@ type ( Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey - memKey storetypes.StoreKey paramstore paramtypes.Subspace bankkeeper types.BankKeeper escrowkeeper types.EscrowKeeper @@ -28,8 +27,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, - storeKey, - memKey storetypes.StoreKey, + storeKey storetypes.StoreKey, ps paramtypes.Subspace, bankkeeper types.BankKeeper, escrowkeeper types.EscrowKeeper, @@ -46,7 +44,6 @@ func NewKeeper( return &Keeper{ cdc: cdc, storeKey: storeKey, - memKey: memKey, paramstore: ps, bankkeeper: bankkeeper, escrowkeeper: escrowkeeper, @@ -62,7 +59,6 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { } func (k *Keeper) UpdateKeeper(newKeeper interface{}) { - if newk, ok := newKeeper.(types.ChainletKeeper); ok { k.chainletkeeper = newk } else if newk, ok := newKeeper.(types.EscrowKeeper); ok { diff --git a/x/billing/module.go b/x/billing/module.go index ee3ebc1..e263028 100644 --- a/x/billing/module.go +++ b/x/billing/module.go @@ -111,6 +111,9 @@ func NewAppModule( } } +func (am AppModule) IsOnePerModuleType() {} +func (am AppModule) IsAppModule() {} + // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) @@ -141,9 +144,11 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} +func (am AppModule) BeginBlock(ctx context.Context) error { + return nil +} // EndBlock contains the logic that is automatically triggered at the end of each block -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} +func (am AppModule) EndBlock(ctx context.Context) error { + return nil } diff --git a/x/billing/module_simulation.go b/x/billing/module_simulation.go index bac014a..a2b80fb 100644 --- a/x/billing/module_simulation.go +++ b/x/billing/module_simulation.go @@ -5,7 +5,6 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" @@ -51,9 +50,6 @@ func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.LegacyParamChange return []simtypes.LegacyParamChange{} } -// RegisterStoreDecoder registers a decoder -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 { operations := make([]simtypes.WeightedOperation, 0) diff --git a/x/billing/testutil/expected_keepers_mocks.go b/x/billing/testutil/expected_keepers_mocks.go index d4d8e8b..d491ac8 100644 --- a/x/billing/testutil/expected_keepers_mocks.go +++ b/x/billing/testutil/expected_keepers_mocks.go @@ -9,13 +9,12 @@ import ( reflect "reflect" types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/auth/types" - types1 "github.com/cosmos/cosmos-sdk/x/bank/types" - types2 "github.com/cosmos/cosmos-sdk/x/staking/types" + types0 "github.com/cosmos/cosmos-sdk/x/bank/types" + types1 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" - types3 "github.com/sagaxyz/ssc/x/chainlet/types" - types4 "github.com/sagaxyz/ssc/x/epochs/types" - types5 "github.com/sagaxyz/ssc/x/escrow/types" + types2 "github.com/sagaxyz/ssc/x/chainlet/types" + types3 "github.com/sagaxyz/ssc/x/epochs/types" + types4 "github.com/sagaxyz/ssc/x/escrow/types" ) // MockAccountKeeper is a mock of AccountKeeper interface. @@ -42,10 +41,10 @@ func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { } // GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) types0.AccountI { +func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types0.AccountI) + ret0, _ := ret[0].(types.AccountI) return ret0 } @@ -56,10 +55,10 @@ func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomo } // GetModuleAccount mocks base method. -func (m *MockAccountKeeper) GetModuleAccount(ctx types.Context, moduleName string) types0.ModuleAccountI { +func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types.ModuleAccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) - ret0, _ := ret[0].(types0.ModuleAccountI) + ret0, _ := ret[0].(types.ModuleAccountI) return ret0 } @@ -93,10 +92,10 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { } // GetAccountsBalances mocks base method. -func (m *MockBankKeeper) GetAccountsBalances(ctx types.Context) []types1.Balance { +func (m *MockBankKeeper) GetAccountsBalances(ctx context.Context) []types0.Balance { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccountsBalances", ctx) - ret0, _ := ret[0].([]types1.Balance) + ret0, _ := ret[0].([]types0.Balance) return ret0 } @@ -107,7 +106,7 @@ func (mr *MockBankKeeperMockRecorder) GetAccountsBalances(ctx interface{}) *gomo } // GetAllBalances mocks base method. -func (m *MockBankKeeper) GetAllBalances(ctx types.Context, addr types.AccAddress) types.Coins { +func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr) ret0, _ := ret[0].(types.Coins) @@ -121,7 +120,7 @@ func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gom } // GetBalance mocks base method. -func (m *MockBankKeeper) GetBalance(ctx types.Context, addr types.AccAddress, denom string) types.Coin { +func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types.AccAddress, denom string) types.Coin { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) ret0, _ := ret[0].(types.Coin) @@ -135,7 +134,7 @@ func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) * } // HasBalance mocks base method. -func (m *MockBankKeeper) HasBalance(ctx types.Context, addr types.AccAddress, amt types.Coin) bool { +func (m *MockBankKeeper) HasBalance(ctx context.Context, addr types.AccAddress, amt types.Coin) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HasBalance", ctx, addr, amt) ret0, _ := ret[0].(bool) @@ -149,7 +148,7 @@ func (mr *MockBankKeeperMockRecorder) HasBalance(ctx, addr, amt interface{}) *go } // IterateAccountBalances mocks base method. -func (m *MockBankKeeper) IterateAccountBalances(ctx types.Context, addr types.AccAddress, cb func(types.Coin) bool) { +func (m *MockBankKeeper) IterateAccountBalances(ctx context.Context, addr types.AccAddress, cb func(types.Coin) bool) { m.ctrl.T.Helper() m.ctrl.Call(m, "IterateAccountBalances", ctx, addr, cb) } @@ -161,7 +160,7 @@ func (mr *MockBankKeeperMockRecorder) IterateAccountBalances(ctx, addr, cb inter } // IterateAllBalances mocks base method. -func (m *MockBankKeeper) IterateAllBalances(ctx types.Context, cb func(types.AccAddress, types.Coin) bool) { +func (m *MockBankKeeper) IterateAllBalances(ctx context.Context, cb func(types.AccAddress, types.Coin) bool) { m.ctrl.T.Helper() m.ctrl.Call(m, "IterateAllBalances", ctx, cb) } @@ -173,7 +172,7 @@ func (mr *MockBankKeeperMockRecorder) IterateAllBalances(ctx, cb interface{}) *g } // LockedCoins mocks base method. -func (m *MockBankKeeper) LockedCoins(ctx types.Context, addr types.AccAddress) types.Coins { +func (m *MockBankKeeper) LockedCoins(ctx context.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "LockedCoins", ctx, addr) ret0, _ := ret[0].(types.Coins) @@ -187,7 +186,7 @@ func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock } // SendCoinsFromAccountToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { +func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) ret0, _ := ret[0].(error) @@ -201,7 +200,7 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAd } // SendCoinsFromModuleToAccount mocks base method. -func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) ret0, _ := ret[0].(error) @@ -215,7 +214,7 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderMo } // SendCoinsFromModuleToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types.Context, senderModule, recipientModule string, amt types.Coins) error { +func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) ret0, _ := ret[0].(error) @@ -229,7 +228,7 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderMod } // SpendableCoins mocks base method. -func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins { +func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) ret0, _ := ret[0].(types.Coins) @@ -243,7 +242,7 @@ func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gom } // ValidateBalance mocks base method. -func (m *MockBankKeeper) ValidateBalance(ctx types.Context, addr types.AccAddress) error { +func (m *MockBankKeeper) ValidateBalance(ctx context.Context, addr types.AccAddress) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidateBalance", ctx, addr) ret0, _ := ret[0].(error) @@ -294,10 +293,10 @@ func (mr *MockEscrowKeeperMockRecorder) BillAccount(ctx, amount, chainId, toModu } // GetKprChainletAccount mocks base method. -func (m *MockEscrowKeeper) GetKprChainletAccount(ctx types.Context, chainId string) (types5.ChainletAccount, error) { +func (m *MockEscrowKeeper) GetKprChainletAccount(ctx types.Context, chainId string) (types4.ChainletAccount, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetKprChainletAccount", ctx, chainId) - ret0, _ := ret[0].(types5.ChainletAccount) + ret0, _ := ret[0].(types4.ChainletAccount) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -331,26 +330,13 @@ func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { return m.recorder } -// GetBondedValidatorsByPower mocks base method. -func (m *MockStakingKeeper) GetBondedValidatorsByPower(ctx types.Context) []types2.Validator { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBondedValidatorsByPower", ctx) - ret0, _ := ret[0].([]types2.Validator) - return ret0 -} - -// GetBondedValidatorsByPower indicates an expected call of GetBondedValidatorsByPower. -func (mr *MockStakingKeeperMockRecorder) GetBondedValidatorsByPower(ctx interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBondedValidatorsByPower", reflect.TypeOf((*MockStakingKeeper)(nil).GetBondedValidatorsByPower), ctx) -} - // GetValidators mocks base method. -func (m *MockStakingKeeper) GetValidators(ctx types.Context, maxRetrieve uint32) []types2.Validator { +func (m *MockStakingKeeper) GetValidators(ctx context.Context, maxRetrieve uint32) ([]types1.Validator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetValidators", ctx, maxRetrieve) - ret0, _ := ret[0].([]types2.Validator) - return ret0 + ret0, _ := ret[0].([]types1.Validator) + ret1, _ := ret[1].(error) + return ret0, ret1 } // GetValidators indicates an expected call of GetValidators. @@ -383,10 +369,10 @@ func (m *MockEpochsKeeper) EXPECT() *MockEpochsKeeperMockRecorder { } // GetEpochInfo mocks base method. -func (m *MockEpochsKeeper) GetEpochInfo(ctx types.Context, identifier string) types4.EpochInfo { +func (m *MockEpochsKeeper) GetEpochInfo(ctx types.Context, identifier string) types3.EpochInfo { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetEpochInfo", ctx, identifier) - ret0, _ := ret[0].(types4.EpochInfo) + ret0, _ := ret[0].(types3.EpochInfo) return ret0 } @@ -434,25 +420,25 @@ func (mr *MockChainletKeeperMockRecorder) ChainletExists(ctx, chainId interface{ } // GetChainlet mocks base method. -func (m *MockChainletKeeper) GetChainlet(goCtx context.Context, req *types3.QueryGetChainletRequest) (*types3.QueryGetChainletResponse, error) { +func (m *MockChainletKeeper) GetChainlet(ctx context.Context, req *types2.QueryGetChainletRequest) (*types2.QueryGetChainletResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetChainlet", goCtx, req) - ret0, _ := ret[0].(*types3.QueryGetChainletResponse) + ret := m.ctrl.Call(m, "GetChainlet", ctx, req) + ret0, _ := ret[0].(*types2.QueryGetChainletResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // GetChainlet indicates an expected call of GetChainlet. -func (mr *MockChainletKeeperMockRecorder) GetChainlet(goCtx, req interface{}) *gomock.Call { +func (mr *MockChainletKeeperMockRecorder) GetChainlet(ctx, req interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChainlet", reflect.TypeOf((*MockChainletKeeper)(nil).GetChainlet), goCtx, req) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChainlet", reflect.TypeOf((*MockChainletKeeper)(nil).GetChainlet), ctx, req) } // GetChainletInfo mocks base method. -func (m *MockChainletKeeper) GetChainletInfo(ctx types.Context, chainId string) (*types3.Chainlet, error) { +func (m *MockChainletKeeper) GetChainletInfo(ctx types.Context, chainId string) (*types2.Chainlet, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetChainletInfo", ctx, chainId) - ret0, _ := ret[0].(*types3.Chainlet) + ret0, _ := ret[0].(*types2.Chainlet) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -464,10 +450,10 @@ func (mr *MockChainletKeeperMockRecorder) GetChainletInfo(ctx, chainId interface } // GetChainletStackInfo mocks base method. -func (m *MockChainletKeeper) GetChainletStackInfo(ctx types.Context, chainId string) (*types3.ChainletStack, error) { +func (m *MockChainletKeeper) GetChainletStackInfo(ctx types.Context, chainId string) (*types2.ChainletStack, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetChainletStackInfo", ctx, chainId) - ret0, _ := ret[0].(*types3.ChainletStack) + ret0, _ := ret[0].(*types2.ChainletStack) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -479,10 +465,10 @@ func (mr *MockChainletKeeperMockRecorder) GetChainletStackInfo(ctx, chainId inte } // GetParams mocks base method. -func (m *MockChainletKeeper) GetParams(ctx types.Context) types3.Params { +func (m *MockChainletKeeper) GetParams(ctx types.Context) types2.Params { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetParams", ctx) - ret0, _ := ret[0].(types3.Params) + ret0, _ := ret[0].(types2.Params) return ret0 } @@ -508,33 +494,33 @@ func (mr *MockChainletKeeperMockRecorder) IsChainletStarted(ctx, chainId interfa } // ListChainletStack mocks base method. -func (m *MockChainletKeeper) ListChainletStack(goCtx context.Context, req *types3.QueryListChainletStackRequest) (*types3.QueryListChainletStackResponse, error) { +func (m *MockChainletKeeper) ListChainletStack(ctx context.Context, req *types2.QueryListChainletStackRequest) (*types2.QueryListChainletStackResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListChainletStack", goCtx, req) - ret0, _ := ret[0].(*types3.QueryListChainletStackResponse) + ret := m.ctrl.Call(m, "ListChainletStack", ctx, req) + ret0, _ := ret[0].(*types2.QueryListChainletStackResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ListChainletStack indicates an expected call of ListChainletStack. -func (mr *MockChainletKeeperMockRecorder) ListChainletStack(goCtx, req interface{}) *gomock.Call { +func (mr *MockChainletKeeperMockRecorder) ListChainletStack(ctx, req interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListChainletStack", reflect.TypeOf((*MockChainletKeeper)(nil).ListChainletStack), goCtx, req) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListChainletStack", reflect.TypeOf((*MockChainletKeeper)(nil).ListChainletStack), ctx, req) } // ListChainlets mocks base method. -func (m *MockChainletKeeper) ListChainlets(goCtx context.Context, req *types3.QueryListChainletsRequest) (*types3.QueryListChainletsResponse, error) { +func (m *MockChainletKeeper) ListChainlets(ctx context.Context, req *types2.QueryListChainletsRequest) (*types2.QueryListChainletsResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListChainlets", goCtx, req) - ret0, _ := ret[0].(*types3.QueryListChainletsResponse) + ret := m.ctrl.Call(m, "ListChainlets", ctx, req) + ret0, _ := ret[0].(*types2.QueryListChainletsResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ListChainlets indicates an expected call of ListChainlets. -func (mr *MockChainletKeeperMockRecorder) ListChainlets(goCtx, req interface{}) *gomock.Call { +func (mr *MockChainletKeeperMockRecorder) ListChainlets(ctx, req interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListChainlets", reflect.TypeOf((*MockChainletKeeper)(nil).ListChainlets), goCtx, req) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListChainlets", reflect.TypeOf((*MockChainletKeeper)(nil).ListChainlets), ctx, req) } // StartExistingChainlet mocks base method. diff --git a/x/billing/types/expected_keepers.go b/x/billing/types/expected_keepers.go index d473798..b284d70 100644 --- a/x/billing/types/expected_keepers.go +++ b/x/billing/types/expected_keepers.go @@ -4,7 +4,6 @@ import ( context "context" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" chainlettypes "github.com/sagaxyz/ssc/x/chainlet/types" @@ -14,28 +13,28 @@ import ( // AccountKeeper defines the expected account keeper used for simulations (noalias) type AccountKeeper interface { - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI // Methods imported from account should be defined here } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - ValidateBalance(ctx sdk.Context, addr sdk.AccAddress) error - HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins + ValidateBalance(ctx context.Context, addr sdk.AccAddress) error + HasBalance(ctx context.Context, addr sdk.AccAddress, amt sdk.Coin) bool - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetAccountsBalances(ctx sdk.Context) []banktypes.Balance - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + GetAccountsBalances(ctx context.Context) []banktypes.Balance + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + LockedCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins - IterateAccountBalances(ctx sdk.Context, addr sdk.AccAddress, cb func(coin sdk.Coin) (stop bool)) - IterateAllBalances(ctx sdk.Context, cb func(address sdk.AccAddress, coin sdk.Coin) (stop bool)) + IterateAccountBalances(ctx context.Context, addr sdk.AccAddress, cb func(coin sdk.Coin) (stop bool)) + IterateAllBalances(ctx context.Context, cb func(address sdk.AccAddress, coin sdk.Coin) (stop bool)) - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error // Methods imported from bank should be defined here } @@ -45,8 +44,7 @@ type EscrowKeeper interface { } type StakingKeeper interface { - GetValidators(ctx sdk.Context, maxRetrieve uint32) (validators []stakingtypes.Validator) - GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator + GetValidators(ctx context.Context, maxRetrieve uint32) (validators []stakingtypes.Validator, err error) } type EpochsKeeper interface { @@ -54,10 +52,10 @@ type EpochsKeeper interface { } type ChainletKeeper interface { - ListChainlets(goCtx context.Context, req *chainlettypes.QueryListChainletsRequest) (*chainlettypes.QueryListChainletsResponse, error) - ListChainletStack(goCtx context.Context, req *chainlettypes.QueryListChainletStackRequest) (*chainlettypes.QueryListChainletStackResponse, error) + ListChainlets(ctx context.Context, req *chainlettypes.QueryListChainletsRequest) (*chainlettypes.QueryListChainletsResponse, error) + ListChainletStack(ctx context.Context, req *chainlettypes.QueryListChainletStackRequest) (*chainlettypes.QueryListChainletStackResponse, error) StopChainlet(ctx sdk.Context, chainId string) error - GetChainlet(goCtx context.Context, req *chainlettypes.QueryGetChainletRequest) (*chainlettypes.QueryGetChainletResponse, error) + GetChainlet(ctx context.Context, req *chainlettypes.QueryGetChainletRequest) (*chainlettypes.QueryGetChainletResponse, error) ChainletExists(ctx sdk.Context, chainId string) bool StartExistingChainlet(ctx sdk.Context, chainId string) error IsChainletStarted(ctx sdk.Context, chainId string) (bool, error) diff --git a/x/billing/types/tx.pb.go b/x/billing/types/tx.pb.go index d52d508..3b9eb4b 100644 --- a/x/billing/types/tx.pb.go +++ b/x/billing/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -26,15 +27,17 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("ssc/billing/tx.proto", fileDescriptor_5648eef8735b4c01) } var fileDescriptor_5648eef8735b4c01 = []byte{ - // 124 bytes of a gzipped FileDescriptorProto + // 150 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x2e, 0x4e, 0xd6, 0x4f, 0xca, 0xcc, 0xc9, 0xc9, 0xcc, 0x4b, 0xd7, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0xe2, 0x2e, 0x2e, 0x4e, 0xd6, 0x83, 0x8a, 0x1a, 0xb1, 0x72, 0x31, 0xfb, 0x16, 0xa7, 0x3b, - 0x39, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, - 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x5a, 0x7a, 0x66, 0x49, - 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x62, 0x7a, 0x62, 0x45, 0x65, 0x95, 0x3e, - 0xc8, 0xd8, 0x0a, 0x84, 0xc1, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0xc3, 0x8d, 0x01, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x9d, 0xaf, 0x4a, 0x59, 0x74, 0x00, 0x00, 0x00, + 0x17, 0xe2, 0x2e, 0x2e, 0x4e, 0xd6, 0x83, 0x8a, 0x4a, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, + 0xeb, 0xe7, 0x16, 0xa7, 0xeb, 0x97, 0x19, 0x82, 0x28, 0x88, 0x2a, 0x23, 0x1e, 0x2e, 0x66, 0xdf, + 0xe2, 0x74, 0x29, 0xd6, 0x86, 0xe7, 0x1b, 0xb4, 0x18, 0x9d, 0x1c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, + 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, + 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x2d, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, + 0x57, 0xbf, 0x38, 0x31, 0x3d, 0xb1, 0xa2, 0xb2, 0x4a, 0x1f, 0x64, 0x6d, 0x05, 0xc2, 0xe2, 0xca, + 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xb1, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x3d, + 0x56, 0x64, 0x94, 0x00, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/chainlet/client/cli/query_get_chainlet.go b/x/chainlet/client/cli/query_get_chainlet.go index b33a2ce..0badbb2 100644 --- a/x/chainlet/client/cli/query_get_chainlet.go +++ b/x/chainlet/client/cli/query_get_chainlet.go @@ -1,16 +1,12 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/sagaxyz/ssc/x/chainlet/types" "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdGetChainlet() *cobra.Command { cmd := &cobra.Command{ Use: "get-chainlet [chain-id]", diff --git a/x/chainlet/client/cli/query_get_chainlet_stack.go b/x/chainlet/client/cli/query_get_chainlet_stack.go index f326c9f..12cb186 100644 --- a/x/chainlet/client/cli/query_get_chainlet_stack.go +++ b/x/chainlet/client/cli/query_get_chainlet_stack.go @@ -1,16 +1,12 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/sagaxyz/ssc/x/chainlet/types" "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdGetChainletStack() *cobra.Command { cmd := &cobra.Command{ Use: "get-chainlet-stack [display-name]", diff --git a/x/chainlet/client/cli/query_list_chainlet_stack.go b/x/chainlet/client/cli/query_list_chainlet_stack.go index 521658e..d6de71a 100644 --- a/x/chainlet/client/cli/query_list_chainlet_stack.go +++ b/x/chainlet/client/cli/query_list_chainlet_stack.go @@ -1,16 +1,12 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/sagaxyz/ssc/x/chainlet/types" "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdListChainletStack() *cobra.Command { cmd := &cobra.Command{ Use: "list-chainlet-stack", diff --git a/x/chainlet/client/cli/query_list_chainlets.go b/x/chainlet/client/cli/query_list_chainlets.go index 9e37dc5..1dc7893 100644 --- a/x/chainlet/client/cli/query_list_chainlets.go +++ b/x/chainlet/client/cli/query_list_chainlets.go @@ -1,16 +1,12 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/sagaxyz/ssc/x/chainlet/types" "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdListChainlets() *cobra.Command { cmd := &cobra.Command{ Use: "list-chainlets", diff --git a/x/chainlet/keeper/abci.go b/x/chainlet/keeper/abci.go index 47bdd8b..91d631b 100644 --- a/x/chainlet/keeper/abci.go +++ b/x/chainlet/keeper/abci.go @@ -3,13 +3,12 @@ package keeper import ( "fmt" - abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" ) -func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { +func (k *Keeper) BeginBlock(ctx sdk.Context) error { p := k.GetParams(ctx) - if p.AutomaticChainletUpgrades && req.Header.Height%p.AutomaticChainletUpgradeInterval == 0 { + if p.AutomaticChainletUpgrades && ctx.BlockHeight()%p.AutomaticChainletUpgradeInterval == 0 { ctx.Logger().Debug("checking chainlets for available upgrades") err := k.AutoUpgradeChainlets(ctx) @@ -21,4 +20,5 @@ func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { } k.ForcePendingVSC(ctx) + return nil } diff --git a/x/chainlet/keeper/ccv.go b/x/chainlet/keeper/ccv.go index 7bca400..8965f38 100644 --- a/x/chainlet/keeper/ccv.go +++ b/x/chainlet/keeper/ccv.go @@ -4,11 +4,11 @@ import ( "fmt" "time" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - ccvprovidertypes "github.com/cosmos/interchain-security/v4/x/ccv/provider/types" - ccvtypes "github.com/cosmos/interchain-security/v4/x/ccv/types" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + ccvprovidertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" + ccvtypes "github.com/cosmos/interchain-security/v5/x/ccv/types" "github.com/sagaxyz/ssc/x/chainlet/types" ) @@ -20,7 +20,7 @@ func (k *Keeper) setPendingVSC(ctx sdk.Context, chainId string) { func (k *Keeper) addConsumer(ctx sdk.Context, chainId string, spawnTime time.Time) error { revision := ibcclienttypes.ParseChainID(chainId) - err := k.providerKeeper.HandleConsumerAdditionProposal(ctx, &ccvprovidertypes.ConsumerAdditionProposal{ + err := k.providerKeeper.HandleConsumerAdditionProposal(ctx, &ccvprovidertypes.MsgConsumerAddition{ ChainId: chainId, InitialHeight: ibcclienttypes.NewHeight(revision, 1), SpawnTime: spawnTime, diff --git a/x/chainlet/keeper/chainlet.go b/x/chainlet/keeper/chainlet.go index d4560b6..22847b6 100644 --- a/x/chainlet/keeper/chainlet.go +++ b/x/chainlet/keeper/chainlet.go @@ -6,7 +6,7 @@ import ( "reflect" cosmossdkerrors "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sagaxyz/ssc/x/chainlet/types" diff --git a/x/chainlet/keeper/chainlet_stack.go b/x/chainlet/keeper/chainlet_stack.go index 598b4f6..c17a1b9 100644 --- a/x/chainlet/keeper/chainlet_stack.go +++ b/x/chainlet/keeper/chainlet_stack.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sagaxyz/ssc/x/chainlet/types" diff --git a/x/chainlet/keeper/grpc_query_list_chainlet_stack.go b/x/chainlet/keeper/grpc_query_list_chainlet_stack.go index 4665c58..f6565c4 100644 --- a/x/chainlet/keeper/grpc_query_list_chainlet_stack.go +++ b/x/chainlet/keeper/grpc_query_list_chainlet_stack.go @@ -5,7 +5,7 @@ import ( "github.com/sagaxyz/ssc/x/chainlet/types" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "google.golang.org/grpc/codes" diff --git a/x/chainlet/keeper/grpc_query_list_chainlets.go b/x/chainlet/keeper/grpc_query_list_chainlets.go index e5ae7e8..535634e 100644 --- a/x/chainlet/keeper/grpc_query_list_chainlets.go +++ b/x/chainlet/keeper/grpc_query_list_chainlets.go @@ -5,7 +5,7 @@ import ( "github.com/sagaxyz/ssc/x/chainlet/types" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "google.golang.org/grpc/codes" diff --git a/x/chainlet/keeper/keeper.go b/x/chainlet/keeper/keeper.go index 960a138..0989f40 100644 --- a/x/chainlet/keeper/keeper.go +++ b/x/chainlet/keeper/keeper.go @@ -3,9 +3,9 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -16,25 +16,23 @@ import ( type Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey - memKey storetypes.StoreKey paramstore paramtypes.Subspace billingKeeper types.BillingKeeper providerKeeper types.ProviderKeeper escrowKeeper types.EscrowKeeper - dacKeeper types.DacKeeper + aclKeeper types.AclKeeper stackVersions map[string]*versions.Versions // display name => version tree } func NewKeeper( cdc codec.BinaryCodec, - storeKey, - memKey storetypes.StoreKey, + storeKey storetypes.StoreKey, ps paramtypes.Subspace, providerKeeper types.ProviderKeeper, billingKeeper types.BillingKeeper, escrowKeeper types.EscrowKeeper, - dacKeeper types.DacKeeper, + aclKeeper types.AclKeeper, ) *Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { @@ -44,12 +42,11 @@ func NewKeeper( return &Keeper{ cdc: cdc, storeKey: storeKey, - memKey: memKey, paramstore: ps, billingKeeper: billingKeeper, providerKeeper: providerKeeper, escrowKeeper: escrowKeeper, - dacKeeper: dacKeeper, + aclKeeper: aclKeeper, } } diff --git a/x/chainlet/keeper/keeper_test.go b/x/chainlet/keeper/keeper_test.go index beaeba6..b4f10e5 100644 --- a/x/chainlet/keeper/keeper_test.go +++ b/x/chainlet/keeper/keeper_test.go @@ -3,18 +3,15 @@ package keeper_test import ( "testing" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + storetypes "cosmossdk.io/store/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + tmtime "github.com/cometbft/cometbft/types/time" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/sagaxyz/ssc/x/chainlet" @@ -36,27 +33,6 @@ var ( creator = addrs[0] ) -func DefaultContextWithDB(t *testing.T, keys []storetypes.StoreKey, tkeys []storetypes.StoreKey) testutil.TestContext { //TODO remove - db := dbm.NewMemDB() - cms := store.NewCommitMultiStore(db) - for _, key := range keys { - cms.MountStoreWithDB(key, storetypes.StoreTypeIAVL, db) - } - for _, tkey := range tkeys { - cms.MountStoreWithDB(tkey, storetypes.StoreTypeTransient, db) - } - err := cms.LoadLatestVersion() - assert.NoError(t, err) - - ctx := sdk.NewContext(cms, tmproto.Header{}, false, log.NewNopLogger()) - - return testutil.TestContext{ - Ctx: ctx, - DB: db, - CMS: cms, - } -} - type TestSuite struct { suite.Suite @@ -65,7 +41,7 @@ type TestSuite struct { msgServer types.MsgServer providerKeeper *chainlettestutil.MockProviderKeeper - aclKeeper *chainlettestutil.MockDacKeeper + aclKeeper *chainlettestutil.MockAclKeeper escrowKeeper *chainlettestutil.MockEscrowKeeper billingKeeper *chainlettestutil.MockBillingKeeper } @@ -76,19 +52,24 @@ func TestKeeperTestSuite(t *testing.T) { func (s *TestSuite) SetupTest() { encCfg := moduletestutil.MakeTestEncodingConfig(chainlet.AppModuleBasic{}) - key := sdk.NewKVStoreKey(types.StoreKey) - tkey := sdk.NewTransientStoreKey(types.MemStoreKey) - paramsKey := sdk.NewKVStoreKey(paramstypes.StoreKey) - paramsTkey := sdk.NewTransientStoreKey("params_tkey") - testCtx := DefaultContextWithDB(s.T(), - []storetypes.StoreKey{paramsKey, key}, - []storetypes.StoreKey{paramsTkey, tkey}, + key := storetypes.NewKVStoreKey(types.StoreKey) + paramsKey := storetypes.NewKVStoreKey(paramstypes.StoreKey) + paramsTKey := storetypes.NewTransientStoreKey(paramstypes.TStoreKey) + ctx := testutil.DefaultContextWithKeys( + map[string]*storetypes.KVStoreKey{ + types.StoreKey: key, + paramstypes.StoreKey: paramsKey, + }, + map[string]*storetypes.TransientStoreKey{ + paramstypes.TStoreKey: paramsTKey, + }, + nil, ) - s.ctx = testCtx.Ctx + s.ctx = ctx.WithBlockHeader(tmproto.Header{Time: tmtime.Now()}) ctrl := gomock.NewController(s.T()) s.providerKeeper = chainlettestutil.NewMockProviderKeeper(ctrl) - s.aclKeeper = chainlettestutil.NewMockDacKeeper(ctrl) + s.aclKeeper = chainlettestutil.NewMockAclKeeper(ctrl) s.billingKeeper = chainlettestutil.NewMockBillingKeeper(ctrl) s.escrowKeeper = chainlettestutil.NewMockEscrowKeeper(ctrl) @@ -113,13 +94,13 @@ func (s *TestSuite) SetupTest() { Return("abcd", true). AnyTimes() - paramsKeeper := paramskeeper.NewKeeper(encCfg.Codec, encCfg.Amino, paramsKey, paramsTkey) + paramsKeeper := paramskeeper.NewKeeper(encCfg.Codec, encCfg.Amino, paramsKey, paramsTKey) paramsKeeper.Subspace(paramstypes.ModuleName) paramsKeeper.Subspace(types.ModuleName) sub, _ := paramsKeeper.GetSubspace(types.ModuleName) s.chainletKeeper = keeper.NewKeeper( - encCfg.Codec, key, tkey, sub, + encCfg.Codec, key, sub, s.providerKeeper, s.billingKeeper, s.escrowKeeper, @@ -127,8 +108,8 @@ func (s *TestSuite) SetupTest() { ) s.msgServer = keeper.NewMsgServerImpl(s.chainletKeeper) - s.Require().Equal(testCtx.Ctx.Logger().With("module", "x/"+types.ModuleName), - s.chainletKeeper.Logger(testCtx.Ctx)) + s.Require().Equal(s.ctx.Logger().With("module", "x/"+types.ModuleName), + s.chainletKeeper.Logger(s.ctx)) s.chainletKeeper.SetParams(s.ctx, types.DefaultParams()) s.chainletKeeper.InitializeChainletCount(s.ctx) diff --git a/x/chainlet/keeper/migrations.go b/x/chainlet/keeper/migrations.go index d7493a9..771f722 100644 --- a/x/chainlet/keeper/migrations.go +++ b/x/chainlet/keeper/migrations.go @@ -1,10 +1,8 @@ package keeper import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/sagaxyz/ssc/x/chainlet/exported" - v2 "github.com/sagaxyz/ssc/x/chainlet/migrations/v2" + //v2 "github.com/sagaxyz/ssc/x/chainlet/migrations/v2" ) // Migrator is a struct for handling in-place store migrations. @@ -22,6 +20,6 @@ func NewMigrator(keeper *Keeper, ls exported.Subspace) Migrator { } // Migrate1to2 migrates from version 1 to 2. -func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v2.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) -} +//func (m Migrator) Migrate1to2(ctx sdk.Context) error { +// return v2.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) +//} diff --git a/x/chainlet/keeper/msg_server_create_chainlet_stack.go b/x/chainlet/keeper/msg_server_create_chainlet_stack.go index 3a41cf8..68b9611 100644 --- a/x/chainlet/keeper/msg_server_create_chainlet_stack.go +++ b/x/chainlet/keeper/msg_server_create_chainlet_stack.go @@ -5,7 +5,6 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - dactypes "github.com/sagaxyz/saga-sdk/x/acl/types" "github.com/sagaxyz/ssc/x/chainlet/types" ) @@ -19,8 +18,11 @@ func (k msgServer) CreateChainletStack(goCtx context.Context, msg *types.MsgCrea p := k.GetParams(ctx) if p.ChainletStackProtections { - dacAddr := dactypes.NewAddress(dactypes.AddressFormat_ADDRESS_BECH32, msg.Creator) - if !k.dacKeeper.Allowed(ctx, dacAddr) { + addr, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return &types.MsgCreateChainletStackResponse{}, err + } + if !k.aclKeeper.Allowed(ctx, addr) { return nil, fmt.Errorf("address %s not allowed to create chainlet stacks", msg.Creator) } } @@ -29,7 +31,7 @@ func (k msgServer) CreateChainletStack(goCtx context.Context, msg *types.MsgCrea Image: msg.Image, Version: msg.Version, Checksum: msg.Checksum, - Enabled: true, + Enabled: true, } metaDataUpsert := []types.ChainletStackParams{metaData} chainletStack := types.ChainletStack{ diff --git a/x/chainlet/keeper/msg_server_disable_stack_version.go b/x/chainlet/keeper/msg_server_disable_stack_version.go index 3dcb051..49dc50a 100644 --- a/x/chainlet/keeper/msg_server_disable_stack_version.go +++ b/x/chainlet/keeper/msg_server_disable_stack_version.go @@ -4,9 +4,8 @@ import ( "context" "fmt" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - dactypes "github.com/sagaxyz/saga-sdk/x/acl/types" "github.com/sagaxyz/ssc/x/chainlet/types" ) @@ -20,9 +19,13 @@ func (k msgServer) DisableChainletStackVersion(goCtx context.Context, msg *types p := k.GetParams(ctx) if p.ChainletStackProtections { - dacAddr := dactypes.NewAddress(dactypes.AddressFormat_ADDRESS_BECH32, msg.Creator) - if !k.dacKeeper.Allowed(ctx, dacAddr) { - err = fmt.Errorf("address %s not allowed to modify chainlet stacks", msg.Creator) + var addr sdk.AccAddress + addr, err = sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return + } + if !k.aclKeeper.Allowed(ctx, addr) { + err = fmt.Errorf("address %s not allowed to disable chainlet stacks", msg.Creator) return } } diff --git a/x/chainlet/keeper/msg_server_update_chainlet_stack.go b/x/chainlet/keeper/msg_server_update_chainlet_stack.go index 6ac3aba..81a2b95 100644 --- a/x/chainlet/keeper/msg_server_update_chainlet_stack.go +++ b/x/chainlet/keeper/msg_server_update_chainlet_stack.go @@ -5,7 +5,6 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - dactypes "github.com/sagaxyz/saga-sdk/x/acl/types" "github.com/sagaxyz/ssc/x/chainlet/types" ) @@ -19,9 +18,12 @@ func (k msgServer) UpdateChainletStack(goCtx context.Context, msg *types.MsgUpda p := k.GetParams(ctx) if p.ChainletStackProtections { - dacAddr := dactypes.NewAddress(dactypes.AddressFormat_ADDRESS_BECH32, msg.Creator) - if !k.dacKeeper.Allowed(ctx, dacAddr) { - return nil, fmt.Errorf("address %s not allowed to create chainlet stacks", msg.Creator) + addr, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return nil, err + } + if !k.aclKeeper.Allowed(ctx, addr) { + return nil, fmt.Errorf("address %s not allowed to update chainlet stacks", msg.Creator) } } diff --git a/x/chainlet/keeper/versions.go b/x/chainlet/keeper/versions.go index 8107241..f192455 100644 --- a/x/chainlet/keeper/versions.go +++ b/x/chainlet/keeper/versions.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sagaxyz/ssc/x/chainlet/types" diff --git a/x/chainlet/migrations/v2/store.go b/x/chainlet/migrations/v2/store.go index c5189b1..16358db 100644 --- a/x/chainlet/migrations/v2/store.go +++ b/x/chainlet/migrations/v2/store.go @@ -1,63 +1,17 @@ package v2 - +/* import ( + "fmt" + "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/sagaxyz/ssc/x/chainlet/types" + "github.com/sagaxyz/ssc/x/chainlet/types/versions" ) func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { - // chainletStore := prefix.NewStore(ctx.KVStore(storeKey), []byte(types.ChainletKey)) - // stackStore := prefix.NewStore(ctx.KVStore(storeKey), []byte(types.ChainletStackKey)) - - // // Remove stack versions with an invalid version string - // iterator := stackStore.Iterator(nil, nil) - // for ; iterator.Valid(); iterator.Next() { - // var stack types.ChainletStack - // cdc.MustUnmarshal(iterator.Value(), &stack) - - // newVersions := make([]types.ChainletStackParams, 0, len(stack.Versions)) - // for _, version := range stack.Versions { - // ok := versions.Check(version.Version) - // if ok { - // newVersions = append(newVersions, version) - // continue - // } - - // ctx.Logger().Info(fmt.Sprintf("deleting invalid version %s in stack %s", version.Version, stack.DisplayName)) - // } - // stack.Versions = newVersions - - // if len(stack.Versions) == 0 { - // // Completely delete stack with no versions - // ctx.Logger().Info(fmt.Sprintf("deleting stack %s with no versions", stack.DisplayName)) - - // key := iterator.Key() - // defer stackStore.Delete(key) - // } else { - // updated := cdc.MustMarshal(&stack) - // key := iterator.Key() - // defer stackStore.Set(key, updated) - // } - // } - // iterator.Close() - - // // Remove chainlets with now non-existent chainlet stack - // iterator = chainletStore.Iterator(nil, nil) - // for ; iterator.Valid(); iterator.Next() { - // var chainlet types.Chainlet - // cdc.MustUnmarshal(iterator.Value(), &chainlet) - - // ok := versions.Check(chainlet.ChainletStackVersion) - // if ok { - // continue - // } - - // ctx.Logger().Info(fmt.Sprintf("deleting chainlet %s with deleted stack %s:%s", chainlet.ChainId, chainlet.ChainletStackName, chainlet.ChainletStackVersion)) - // key := iterator.Key() - // defer chainletStore.Delete(key) - // } - // iterator.Close() - return nil -} +}*/ diff --git a/x/chainlet/module.go b/x/chainlet/module.go index 500868e..ec12769 100644 --- a/x/chainlet/module.go +++ b/x/chainlet/module.go @@ -114,20 +114,19 @@ func NewAppModule( } } +func (am AppModule) IsOnePerModuleType() {} +func (am AppModule) IsAppModule() {} + // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) - // m := keeper.NewMigrator(am.keeper, am.legacySubspace) - // err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) - // if err != nil { - // panic(fmt.Sprintf("failed to migrate x/%s from version 1 to 2: %v", types.ModuleName, err)) - // } - // err = cfg.RegisterMigration(types.ModuleName, 2, m.Migrate2to3) - // if err != nil { - // panic(fmt.Sprintf("failed to migrate x/%s from version 2 to 3: %v", types.ModuleName, err)) - // } + //m := keeper.NewMigrator(am.keeper, am.legacySubspace) + //err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) + //if err != nil { + // panic(fmt.Sprintf("failed to migrate x/%s from version 1 to 2: %v", types.ModuleName, err)) + //} } // RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) @@ -151,14 +150,15 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 -func (AppModule) ConsensusVersion() uint64 { return 1 } +func (AppModule) ConsensusVersion() uint64 { return 3 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { - am.keeper.BeginBlock(ctx, req) +func (am AppModule) BeginBlock(ctx context.Context) error { + return am.keeper.BeginBlock(sdk.UnwrapSDKContext(ctx)) + } // EndBlock contains the logic that is automatically triggered at the end of each block -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} +func (am AppModule) EndBlock(_ context.Context) error { + return nil } diff --git a/x/chainlet/module_simulation.go b/x/chainlet/module_simulation.go index 9661034..65b847e 100644 --- a/x/chainlet/module_simulation.go +++ b/x/chainlet/module_simulation.go @@ -9,7 +9,6 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" @@ -69,14 +68,14 @@ func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.LegacyParamChange } // RegisterStoreDecoder registers a decoder -func (am AppModule) RegisterStoreDecoder(_ 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 { operations := make([]simtypes.WeightedOperation, 0) var weightMsgCreateChainletStack int - simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgCreateChainletStack, &weightMsgCreateChainletStack, nil, + simState.AppParams.GetOrGenerate(opWeightMsgCreateChainletStack, &weightMsgCreateChainletStack, nil, func(_ *rand.Rand) { weightMsgCreateChainletStack = defaultWeightMsgCreateChainletStack }, @@ -87,7 +86,7 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp )) var weightMsgLaunchChainlet int - simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgLaunchChainlet, &weightMsgLaunchChainlet, nil, + simState.AppParams.GetOrGenerate(opWeightMsgLaunchChainlet, &weightMsgLaunchChainlet, nil, func(_ *rand.Rand) { weightMsgLaunchChainlet = defaultWeightMsgLaunchChainlet }, @@ -98,7 +97,7 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp )) var weightMsgUpdateChainletStack int - simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgUpdateChainletStack, &weightMsgUpdateChainletStack, nil, + simState.AppParams.GetOrGenerate(opWeightMsgUpdateChainletStack, &weightMsgUpdateChainletStack, nil, func(_ *rand.Rand) { weightMsgUpdateChainletStack = defaultWeightMsgUpdateChainletStack }, @@ -109,7 +108,7 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp )) var weightMsgUpgradeChainlet int - simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgUpgradeChainlet, &weightMsgUpgradeChainlet, nil, + simState.AppParams.GetOrGenerate(opWeightMsgUpgradeChainlet, &weightMsgUpgradeChainlet, nil, func(_ *rand.Rand) { weightMsgUpgradeChainlet = defaultWeightMsgUpgradeChainlet }, diff --git a/x/chainlet/testutil/expected_keepers_mocks.go b/x/chainlet/testutil/expected_keepers_mocks.go index 052fa3f..483d7b2 100644 --- a/x/chainlet/testutil/expected_keepers_mocks.go +++ b/x/chainlet/testutil/expected_keepers_mocks.go @@ -5,15 +5,14 @@ package testutil import ( + context "context" reflect "reflect" types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/auth/types" - types1 "github.com/cosmos/interchain-security/v4/x/ccv/provider/types" - types2 "github.com/cosmos/interchain-security/v4/x/ccv/types" + types0 "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" + types1 "github.com/cosmos/interchain-security/v5/x/ccv/types" gomock "github.com/golang/mock/gomock" - types3 "github.com/sagaxyz/saga-sdk/x/acl/types" - types4 "github.com/sagaxyz/ssc/x/chainlet/types" + types2 "github.com/sagaxyz/ssc/x/chainlet/types" ) // MockAccountKeeper is a mock of AccountKeeper interface. @@ -40,10 +39,10 @@ func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { } // GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) types0.AccountI { +func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types0.AccountI) + ret0, _ := ret[0].(types.AccountI) return ret0 } @@ -54,10 +53,10 @@ func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomo } // GetModuleAccount mocks base method. -func (m *MockAccountKeeper) GetModuleAccount(ctx types.Context, moduleName string) types0.ModuleAccountI { +func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types.ModuleAccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) - ret0, _ := ret[0].(types0.ModuleAccountI) + ret0, _ := ret[0].(types.ModuleAccountI) return ret0 } @@ -114,7 +113,7 @@ func (m *MockProviderKeeper) EXPECT() *MockProviderKeeperMockRecorder { } // AppendPendingVSCPackets mocks base method. -func (m *MockProviderKeeper) AppendPendingVSCPackets(ctx types.Context, chainID string, newPackets ...types2.ValidatorSetChangePacketData) { +func (m *MockProviderKeeper) AppendPendingVSCPackets(ctx types.Context, chainID string, newPackets ...types1.ValidatorSetChangePacketData) { m.ctrl.T.Helper() varargs := []interface{}{ctx, chainID} for _, a := range newPackets { @@ -175,7 +174,7 @@ func (mr *MockProviderKeeperMockRecorder) GetValidatorSetUpdateId(ctx interface{ } // HandleConsumerAdditionProposal mocks base method. -func (m *MockProviderKeeper) HandleConsumerAdditionProposal(ctx types.Context, prop *types1.ConsumerAdditionProposal) error { +func (m *MockProviderKeeper) HandleConsumerAdditionProposal(ctx types.Context, prop *types0.MsgConsumerAddition) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HandleConsumerAdditionProposal", ctx, prop) ret0, _ := ret[0].(error) @@ -236,7 +235,7 @@ func (m *MockBillingKeeper) EXPECT() *MockBillingKeeperMockRecorder { } // BillAccount mocks base method. -func (m *MockBillingKeeper) BillAccount(ctx types.Context, amount types.Coin, chainlet types4.Chainlet, epochIdentifier, memo string) error { +func (m *MockBillingKeeper) BillAccount(ctx types.Context, amount types.Coin, chainlet types2.Chainlet, epochIdentifier, memo string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BillAccount", ctx, amount, chainlet, epochIdentifier, memo) ret0, _ := ret[0].(error) @@ -300,31 +299,31 @@ func (mr *MockEscrowKeeperMockRecorder) NewChainletAccount(ctx, address, chainId return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewChainletAccount", reflect.TypeOf((*MockEscrowKeeper)(nil).NewChainletAccount), ctx, address, chainId, depositAmount) } -// MockDacKeeper is a mock of DacKeeper interface. -type MockDacKeeper struct { +// MockAclKeeper is a mock of AclKeeper interface. +type MockAclKeeper struct { ctrl *gomock.Controller - recorder *MockDacKeeperMockRecorder + recorder *MockAclKeeperMockRecorder } -// MockDacKeeperMockRecorder is the mock recorder for MockDacKeeper. -type MockDacKeeperMockRecorder struct { - mock *MockDacKeeper +// MockAclKeeperMockRecorder is the mock recorder for MockAclKeeper. +type MockAclKeeperMockRecorder struct { + mock *MockAclKeeper } -// NewMockDacKeeper creates a new mock instance. -func NewMockDacKeeper(ctrl *gomock.Controller) *MockDacKeeper { - mock := &MockDacKeeper{ctrl: ctrl} - mock.recorder = &MockDacKeeperMockRecorder{mock} +// NewMockAclKeeper creates a new mock instance. +func NewMockAclKeeper(ctrl *gomock.Controller) *MockAclKeeper { + mock := &MockAclKeeper{ctrl: ctrl} + mock.recorder = &MockAclKeeperMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDacKeeper) EXPECT() *MockDacKeeperMockRecorder { +func (m *MockAclKeeper) EXPECT() *MockAclKeeperMockRecorder { return m.recorder } // Allowed mocks base method. -func (m *MockDacKeeper) Allowed(ctx types.Context, addr *types3.Address) bool { +func (m *MockAclKeeper) Allowed(ctx types.Context, addr types.AccAddress) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Allowed", ctx, addr) ret0, _ := ret[0].(bool) @@ -332,7 +331,7 @@ func (m *MockDacKeeper) Allowed(ctx types.Context, addr *types3.Address) bool { } // Allowed indicates an expected call of Allowed. -func (mr *MockDacKeeperMockRecorder) Allowed(ctx, addr interface{}) *gomock.Call { +func (mr *MockAclKeeperMockRecorder) Allowed(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Allowed", reflect.TypeOf((*MockDacKeeper)(nil).Allowed), ctx, addr) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Allowed", reflect.TypeOf((*MockAclKeeper)(nil).Allowed), ctx, addr) } diff --git a/x/chainlet/types/expected_keepers.go b/x/chainlet/types/expected_keepers.go index c002a72..3051fe6 100644 --- a/x/chainlet/types/expected_keepers.go +++ b/x/chainlet/types/expected_keepers.go @@ -1,17 +1,17 @@ package types import ( + "context" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/types" - ccvprovidertypes "github.com/cosmos/interchain-security/v4/x/ccv/provider/types" - ccvtypes "github.com/cosmos/interchain-security/v4/x/ccv/types" - dactypes "github.com/sagaxyz/saga-sdk/x/acl/types" + ccvprovidertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" + ccvtypes "github.com/cosmos/interchain-security/v5/x/ccv/types" ) // AccountKeeper defines the expected account keeper used for simulations (noalias) type AccountKeeper interface { - GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI - GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI // Methods imported from account should be defined here } @@ -19,7 +19,7 @@ type BankKeeper interface { } type ProviderKeeper interface { - HandleConsumerAdditionProposal(ctx sdk.Context, prop *ccvprovidertypes.ConsumerAdditionProposal) error + HandleConsumerAdditionProposal(ctx sdk.Context, prop *ccvprovidertypes.MsgConsumerAddition) error AppendPendingVSCPackets(ctx sdk.Context, chainID string, newPackets ...ccvtypes.ValidatorSetChangePacketData) GetValidatorSetUpdateId(ctx sdk.Context) (validatorSetUpdateId uint64) IncrementValidatorSetUpdateId(ctx sdk.Context) @@ -37,6 +37,6 @@ type EscrowKeeper interface { NewChainletAccount(ctx sdk.Context, address sdk.AccAddress, chainId string, depositAmount sdk.Coin) error } -type DacKeeper interface { - Allowed(ctx sdk.Context, addr *dactypes.Address) bool +type AclKeeper interface { + Allowed(ctx sdk.Context, addr sdk.AccAddress) bool } diff --git a/x/chainlet/types/message_create_chainlet_stack.go b/x/chainlet/types/message_create_chainlet_stack.go index c435fd9..f273959 100644 --- a/x/chainlet/types/message_create_chainlet_stack.go +++ b/x/chainlet/types/message_create_chainlet_stack.go @@ -31,19 +31,6 @@ func (msg *MsgCreateChainletStack) Type() string { return TypeMsgCreateChainletStack } -func (msg *MsgCreateChainletStack) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgCreateChainletStack) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - func (msg *MsgCreateChainletStack) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { @@ -74,8 +61,7 @@ func (msg *MsgCreateChainletStack) ValidateBasic() error { if err != nil { return ErrInvalidCoin } - - if !coin.Amount.GT(sdk.ZeroInt()) { + if !coin.Amount.IsPositive() { return ErrInvalidCoin } @@ -83,8 +69,7 @@ func (msg *MsgCreateChainletStack) ValidateBasic() error { if err != nil { return ErrInvalidCoin } - - if !coin.Amount.GT(sdk.ZeroInt()) { + if !coin.Amount.IsPositive() { return ErrInvalidCoin } diff --git a/x/chainlet/types/message_disable_chainlet_stack.go b/x/chainlet/types/message_disable_chainlet_stack.go index 6753c6e..4899088 100644 --- a/x/chainlet/types/message_disable_chainlet_stack.go +++ b/x/chainlet/types/message_disable_chainlet_stack.go @@ -26,19 +26,6 @@ func (msg *MsgDisableChainletStackVersion) Type() string { return TypeMsgDisableChainletStackVersion } -func (msg *MsgDisableChainletStackVersion) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgDisableChainletStackVersion) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - func (msg *MsgDisableChainletStackVersion) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { diff --git a/x/chainlet/types/message_launch_chainlet.go b/x/chainlet/types/message_launch_chainlet.go index 7e58ef8..c5e3f19 100644 --- a/x/chainlet/types/message_launch_chainlet.go +++ b/x/chainlet/types/message_launch_chainlet.go @@ -42,19 +42,6 @@ func (msg *MsgLaunchChainlet) Type() string { return TypeMsgLaunchChainlet } -func (msg *MsgLaunchChainlet) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgLaunchChainlet) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - func (msg *MsgLaunchChainlet) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { diff --git a/x/chainlet/types/message_update_chainlet_stack.go b/x/chainlet/types/message_update_chainlet_stack.go index 92d8c91..1f767f6 100644 --- a/x/chainlet/types/message_update_chainlet_stack.go +++ b/x/chainlet/types/message_update_chainlet_stack.go @@ -28,19 +28,6 @@ func (msg *MsgUpdateChainletStack) Type() string { return TypeMsgUpdateChainletStack } -func (msg *MsgUpdateChainletStack) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgUpdateChainletStack) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - func (msg *MsgUpdateChainletStack) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { diff --git a/x/chainlet/types/message_upgrade_chainlet.go b/x/chainlet/types/message_upgrade_chainlet.go index 872cc2d..1c89aa4 100644 --- a/x/chainlet/types/message_upgrade_chainlet.go +++ b/x/chainlet/types/message_upgrade_chainlet.go @@ -26,19 +26,6 @@ func (msg *MsgUpgradeChainlet) Type() string { return TypeMsgUpgradeChainlet } -func (msg *MsgUpgradeChainlet) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgUpgradeChainlet) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - func (msg *MsgUpgradeChainlet) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { diff --git a/x/chainlet/types/tx.pb.go b/x/chainlet/types/tx.pb.go index 3b957f6..b04792e 100644 --- a/x/chainlet/types/tx.pb.go +++ b/x/chainlet/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -623,48 +624,51 @@ func init() { func init() { proto.RegisterFile("ssc/chainlet/tx.proto", fileDescriptor_7e7ff960f25a570e) } var fileDescriptor_7e7ff960f25a570e = []byte{ - // 652 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x8d, 0xeb, 0xf4, 0x6b, 0x5a, 0x81, 0xba, 0x2d, 0xc8, 0xb8, 0xc5, 0x35, 0x16, 0xa2, 0x39, - 0x54, 0x89, 0x54, 0xb8, 0xc0, 0xad, 0x1f, 0x42, 0x42, 0xa2, 0x08, 0x05, 0x95, 0x43, 0x25, 0x84, - 0x36, 0xeb, 0xc5, 0x59, 0x35, 0xfe, 0x90, 0xd7, 0xa9, 0x12, 0x6e, 0x9c, 0xb8, 0x72, 0xe6, 0xc4, - 0xcf, 0xe9, 0xb1, 0x47, 0x4e, 0x08, 0x25, 0xbf, 0x03, 0x09, 0x79, 0xd7, 0x36, 0x76, 0xed, 0xb8, - 0x05, 0x71, 0xf3, 0xcc, 0xbc, 0xf1, 0xcc, 0x7b, 0xfb, 0xec, 0x85, 0x3b, 0x9c, 0x93, 0x0e, 0xe9, - 0x63, 0xe6, 0x0d, 0x68, 0xd4, 0x89, 0x46, 0xed, 0x20, 0xf4, 0x23, 0x1f, 0xad, 0x72, 0x4e, 0xda, - 0x69, 0x5a, 0xdf, 0x70, 0x7c, 0xc7, 0x17, 0x85, 0x4e, 0xfc, 0x24, 0x31, 0xba, 0x55, 0x68, 0x4d, - 0x1f, 0xde, 0x07, 0x38, 0xc4, 0x2e, 0x4f, 0x30, 0x0f, 0xaa, 0x31, 0x3c, 0xc2, 0xe4, 0x4c, 0x42, - 0xac, 0x5f, 0x0a, 0xdc, 0x3d, 0xe6, 0xce, 0x61, 0x48, 0x71, 0x44, 0x0f, 0x13, 0xc4, 0x9b, 0x18, - 0x80, 0x34, 0x58, 0x24, 0x71, 0xda, 0x0f, 0x35, 0xc5, 0x54, 0x5a, 0xcb, 0xdd, 0x34, 0x44, 0x26, - 0xac, 0xd8, 0x8c, 0x07, 0x03, 0x3c, 0x7e, 0x85, 0x5d, 0xaa, 0xcd, 0x89, 0x6a, 0x3e, 0x25, 0x10, - 0x94, 0x93, 0x90, 0x05, 0x11, 0xf3, 0x3d, 0x4d, 0x4d, 0x10, 0x7f, 0x52, 0x68, 0x03, 0xe6, 0x99, - 0x8b, 0x1d, 0xaa, 0x35, 0x45, 0x4d, 0x06, 0xf1, 0xcc, 0x73, 0x1a, 0xf2, 0xb8, 0x67, 0x5e, 0xce, - 0x4c, 0x42, 0xa4, 0xc3, 0x12, 0xe9, 0x53, 0x72, 0xc6, 0x87, 0xae, 0xb6, 0x20, 0x4a, 0x59, 0x8c, - 0x9e, 0x42, 0xf3, 0x03, 0xa5, 0x5c, 0x5b, 0x34, 0x95, 0xd6, 0xca, 0xde, 0x76, 0x3b, 0x2f, 0x5f, - 0xbb, 0x40, 0xea, 0x39, 0xa5, 0xfc, 0xa0, 0x79, 0xf1, 0x63, 0xbb, 0xd1, 0x15, 0x2d, 0x96, 0x09, - 0x46, 0x35, 0xfd, 0x2e, 0xe5, 0x81, 0xef, 0x71, 0x6a, 0x7d, 0x56, 0x61, 0xed, 0x98, 0x3b, 0x2f, - 0xf1, 0xd0, 0x23, 0xfd, 0x14, 0x52, 0x2f, 0x8e, 0x8b, 0x99, 0x17, 0x61, 0xe6, 0xd1, 0x90, 0x6b, - 0x73, 0xa6, 0x1a, 0x53, 0xcf, 0xa5, 0xd0, 0x2e, 0xac, 0x91, 0xfc, 0x28, 0x21, 0xa2, 0x94, 0xa8, - 0x5c, 0x40, 0x7b, 0xb0, 0x51, 0x48, 0xbe, 0x4d, 0xf4, 0x91, 0xba, 0x55, 0xd6, 0xc4, 0x76, 0x71, - 0xfe, 0x85, 0x9d, 0xca, 0x98, 0x84, 0xc8, 0x82, 0xd5, 0xb4, 0x43, 0x8c, 0x95, 0x52, 0x16, 0x72, - 0xe8, 0x19, 0x2c, 0x48, 0x1b, 0x25, 0x82, 0x6e, 0x55, 0x0b, 0xfa, 0x5a, 0x60, 0x12, 0x35, 0x93, - 0x0e, 0x74, 0x04, 0xf7, 0x6d, 0xc6, 0x71, 0x6f, 0x40, 0xf7, 0x87, 0x91, 0xef, 0xe2, 0x88, 0x11, - 0xb1, 0xd9, 0x49, 0xe0, 0x84, 0xd8, 0xa6, 0x5c, 0x5b, 0x32, 0x95, 0xd6, 0x52, 0xb7, 0x1e, 0x14, - 0x9b, 0xc3, 0xa6, 0x9e, 0xef, 0x6a, 0xcb, 0xd2, 0x1c, 0x22, 0xb0, 0x36, 0xe1, 0x5e, 0xe9, 0x20, - 0xb2, 0x63, 0xfa, 0x26, 0x8d, 0x7c, 0x12, 0xd8, 0xff, 0xd5, 0xc8, 0x99, 0x4d, 0xd5, 0x19, 0x36, - 0x6d, 0xce, 0xb6, 0xe9, 0x7c, 0xd1, 0xa6, 0x89, 0xd7, 0x2a, 0x36, 0xcc, 0x48, 0x9c, 0x0b, 0xc4, - 0x91, 0xd4, 0xe6, 0x70, 0xd6, 0xc9, 0xfe, 0x2b, 0x97, 0xdc, 0xd6, 0x6a, 0x61, 0x6b, 0xab, 0x05, - 0x8f, 0xea, 0xe7, 0x66, 0x1b, 0x0e, 0x00, 0x09, 0x0e, 0xe2, 0xa0, 0x6e, 0xf0, 0x35, 0xe4, 0x9c, - 0x38, 0x57, 0x72, 0x22, 0xcf, 0xfb, 0x59, 0xae, 0x54, 0xc8, 0x59, 0x5b, 0xa0, 0x97, 0xa7, 0xa5, - 0xbb, 0xec, 0x7d, 0x6d, 0x82, 0x7a, 0xcc, 0x1d, 0xc4, 0x60, 0xbd, 0xea, 0xff, 0xf5, 0xb0, 0x68, - 0xdb, 0xea, 0xcf, 0x5c, 0xdf, 0xbd, 0x09, 0x2a, 0x1d, 0x89, 0x4e, 0xe1, 0xd6, 0x95, 0x1f, 0xc1, - 0x76, 0xa9, 0xbf, 0x08, 0xd0, 0x77, 0xae, 0x01, 0x64, 0xef, 0x66, 0xb0, 0x5e, 0xe5, 0xde, 0x32, - 0x8d, 0x0a, 0x54, 0x05, 0x8d, 0x1a, 0x9f, 0xa1, 0x4f, 0x0a, 0x6c, 0xd6, 0xb9, 0xac, 0xfc, 0xb6, - 0x1a, 0xb4, 0xfe, 0xe4, 0x6f, 0xd0, 0xd9, 0x0e, 0xef, 0xe0, 0xf6, 0x55, 0x1b, 0x99, 0x15, 0x24, - 0x0a, 0x08, 0xbd, 0x75, 0x1d, 0x22, 0x7d, 0xfd, 0xc1, 0xfe, 0xc5, 0xc4, 0x50, 0x2e, 0x27, 0x86, - 0xf2, 0x73, 0x62, 0x28, 0x5f, 0xa6, 0x46, 0xe3, 0x72, 0x6a, 0x34, 0xbe, 0x4f, 0x8d, 0xc6, 0xe9, - 0x8e, 0xc3, 0xa2, 0xfe, 0xb0, 0xd7, 0x26, 0xbe, 0xdb, 0xe1, 0xd8, 0xc1, 0xa3, 0xf1, 0xc7, 0x4e, - 0x7c, 0x51, 0x8e, 0x72, 0x37, 0xf1, 0x38, 0xa0, 0xbc, 0xb7, 0x20, 0xae, 0xc8, 0xc7, 0xbf, 0x03, - 0x00, 0x00, 0xff, 0xff, 0x7a, 0x91, 0xe3, 0x4e, 0xa6, 0x07, 0x00, 0x00, + // 697 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x4e, 0x14, 0x4d, + 0x14, 0x9e, 0x9e, 0x0b, 0x97, 0x03, 0xf9, 0xff, 0x50, 0xa0, 0xb6, 0x0d, 0x36, 0xed, 0xc4, 0xc8, + 0x84, 0x90, 0xe9, 0x88, 0x6e, 0x64, 0xc7, 0x25, 0x26, 0x26, 0x62, 0xcc, 0x18, 0x5c, 0x90, 0x18, + 0x53, 0xd4, 0x94, 0x3d, 0x1d, 0xe8, 0x4b, 0xfa, 0xf4, 0x10, 0x60, 0xa5, 0xc6, 0x9d, 0x1b, 0x37, + 0x3e, 0x80, 0x2f, 0x60, 0x78, 0x0c, 0x96, 0x2c, 0x5d, 0x19, 0x03, 0x0b, 0x5e, 0xc3, 0x74, 0xf5, + 0xc5, 0xee, 0xe9, 0x62, 0x40, 0xe3, 0x6a, 0xfa, 0x9c, 0xf3, 0x55, 0x9d, 0xf3, 0x7d, 0xf5, 0x4d, + 0x15, 0xdc, 0x40, 0x64, 0x26, 0xeb, 0x51, 0xdb, 0xdd, 0xe3, 0xa1, 0x19, 0x1e, 0xb4, 0xfd, 0xc0, + 0x0b, 0x3d, 0x32, 0x89, 0xc8, 0xda, 0x69, 0x5a, 0x9b, 0xb1, 0x3c, 0xcb, 0x13, 0x05, 0x33, 0xfa, + 0x8a, 0x31, 0xda, 0x2d, 0xe6, 0xa1, 0xe3, 0xa1, 0xe9, 0xa0, 0x65, 0xee, 0x3f, 0x88, 0x7e, 0x92, + 0x42, 0xb3, 0xb0, 0x67, 0xfa, 0xf1, 0xc6, 0xa7, 0x01, 0x75, 0x30, 0xc1, 0xdc, 0x95, 0x63, 0x30, + 0xa4, 0x6c, 0x37, 0x86, 0x34, 0x3f, 0x55, 0xe1, 0xe6, 0x26, 0x5a, 0xeb, 0x01, 0xa7, 0x21, 0x5f, + 0x4f, 0x10, 0x2f, 0x23, 0x00, 0x51, 0x61, 0x94, 0x45, 0x69, 0x2f, 0x50, 0x15, 0x43, 0x69, 0x8d, + 0x77, 0xd2, 0x90, 0x18, 0x30, 0xd1, 0xb5, 0xd1, 0xdf, 0xa3, 0x87, 0xcf, 0xa9, 0xc3, 0xd5, 0xaa, + 0xa8, 0xe6, 0x53, 0x02, 0xc1, 0x91, 0x05, 0xb6, 0x1f, 0xda, 0x9e, 0xab, 0xd6, 0x12, 0xc4, 0xef, + 0x14, 0x99, 0x81, 0x86, 0xed, 0x50, 0x8b, 0xab, 0x75, 0x51, 0x8b, 0x83, 0xa8, 0xe7, 0x3e, 0x0f, + 0x30, 0x5a, 0xd3, 0x88, 0x7b, 0x26, 0x21, 0xd1, 0x60, 0x8c, 0xf5, 0x38, 0xdb, 0xc5, 0xbe, 0xa3, + 0x8e, 0x88, 0x52, 0x16, 0x93, 0xc7, 0x50, 0x7f, 0xcb, 0x39, 0xaa, 0xa3, 0x86, 0xd2, 0x9a, 0x58, + 0x9e, 0x6f, 0xe7, 0x75, 0x6d, 0x17, 0x48, 0x3d, 0xe1, 0x1c, 0xd7, 0xea, 0x27, 0x3f, 0xe6, 0x2b, + 0x1d, 0xb1, 0x64, 0x65, 0xf2, 0xc3, 0xc5, 0xf1, 0x62, 0x4a, 0xac, 0x69, 0x80, 0x2e, 0x17, 0xa3, + 0xc3, 0xd1, 0xf7, 0x5c, 0xe4, 0xcd, 0x2f, 0x35, 0x98, 0xda, 0x44, 0xeb, 0x19, 0xed, 0xbb, 0xac, + 0x97, 0x42, 0x86, 0x4b, 0xe5, 0x50, 0xdb, 0x0d, 0xa9, 0xed, 0xf2, 0x00, 0xd5, 0xaa, 0x51, 0x8b, + 0x84, 0xc8, 0xa5, 0xc8, 0x12, 0x4c, 0xb1, 0x7c, 0x2b, 0x21, 0x69, 0x2c, 0x58, 0xb9, 0x40, 0x96, + 0x61, 0xa6, 0x90, 0x7c, 0x95, 0xa8, 0x15, 0xab, 0x28, 0xad, 0x89, 0xe9, 0xa2, 0xfc, 0xd3, 0x6e, + 0x2a, 0x6a, 0x12, 0x92, 0x26, 0x4c, 0xa6, 0x2b, 0x44, 0xdb, 0x58, 0xd8, 0x42, 0x8e, 0xac, 0xc0, + 0x48, 0x6c, 0xaa, 0x44, 0xde, 0x39, 0xb9, 0xbc, 0x2f, 0x04, 0x26, 0xd1, 0x36, 0x59, 0x41, 0x36, + 0xe0, 0x4e, 0xd7, 0x46, 0xba, 0xb3, 0xc7, 0x57, 0xfb, 0xa1, 0xe7, 0xd0, 0xd0, 0x66, 0x62, 0xb2, + 0x2d, 0xdf, 0x0a, 0x68, 0x97, 0xa3, 0x3a, 0x66, 0x28, 0xad, 0xb1, 0xce, 0x70, 0x50, 0x64, 0x95, + 0x2e, 0x77, 0x3d, 0x47, 0x1d, 0x8f, 0xad, 0x22, 0x82, 0x81, 0x93, 0x9b, 0x85, 0xdb, 0xa5, 0x63, + 0xc9, 0x0e, 0xed, 0x9b, 0x22, 0x4c, 0xbe, 0xe5, 0x77, 0xff, 0xa9, 0xc9, 0x33, 0x0b, 0xd7, 0x2e, + 0xb1, 0x70, 0xfd, 0x72, 0x0b, 0x37, 0x8a, 0x16, 0x96, 0xfa, 0x50, 0x32, 0x6f, 0x46, 0xe9, 0xa3, + 0x22, 0x20, 0x1b, 0xb1, 0x70, 0xeb, 0x97, 0x1d, 0xfb, 0xdf, 0x52, 0xcb, 0x91, 0xa8, 0x15, 0x48, + 0x0c, 0x0c, 0xda, 0x82, 0xfb, 0xc3, 0xa7, 0xc8, 0x06, 0x3e, 0x02, 0x22, 0x28, 0x89, 0x33, 0xbd, + 0xc6, 0x1f, 0x27, 0x67, 0xda, 0x6a, 0xc9, 0xb4, 0x98, 0xb7, 0x7e, 0x3c, 0x60, 0x21, 0x37, 0x30, + 0xe5, 0x1c, 0x68, 0xe5, 0xde, 0xe9, 0x64, 0xcb, 0x5f, 0xeb, 0x50, 0xdb, 0x44, 0x8b, 0xd8, 0x30, + 0x2d, 0xbb, 0x06, 0xef, 0x15, 0xfd, 0x2e, 0xbf, 0x1f, 0xb4, 0xa5, 0xeb, 0xa0, 0xd2, 0x96, 0x64, + 0x1b, 0xfe, 0x1b, 0xb8, 0x41, 0xe6, 0x4b, 0xeb, 0x8b, 0x00, 0x6d, 0xe1, 0x0a, 0x40, 0xb6, 0xb7, + 0x0d, 0xd3, 0x32, 0xa3, 0x97, 0x69, 0x48, 0x50, 0x12, 0x1a, 0x43, 0x4c, 0x48, 0xde, 0x2b, 0x30, + 0x3b, 0xcc, 0x81, 0xe5, 0xdd, 0x86, 0xa0, 0xb5, 0x47, 0x7f, 0x82, 0xce, 0x66, 0x78, 0x0d, 0xff, + 0x0f, 0x9a, 0xca, 0x90, 0x90, 0x28, 0x20, 0xb4, 0xd6, 0x55, 0x88, 0x74, 0x7b, 0xad, 0xf1, 0xee, + 0xe2, 0x78, 0x51, 0x59, 0x5b, 0x3d, 0x39, 0xd3, 0x95, 0xd3, 0x33, 0x5d, 0xf9, 0x79, 0xa6, 0x2b, + 0x9f, 0xcf, 0xf5, 0xca, 0xe9, 0xb9, 0x5e, 0xf9, 0x7e, 0xae, 0x57, 0xb6, 0x17, 0x2c, 0x3b, 0xec, + 0xf5, 0x77, 0xda, 0xcc, 0x73, 0x4c, 0xa4, 0x16, 0x3d, 0x38, 0x3c, 0x32, 0xa3, 0x67, 0xf7, 0x20, + 0xf7, 0xe0, 0x1f, 0xfa, 0x1c, 0x77, 0x46, 0xc4, 0x83, 0xfb, 0xf0, 0x57, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x71, 0xc7, 0xa6, 0xb8, 0x0d, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/epochs/keeper/abci.go b/x/epochs/keeper/abci.go index a69b156..7133ba5 100644 --- a/x/epochs/keeper/abci.go +++ b/x/epochs/keeper/abci.go @@ -11,8 +11,9 @@ import ( ) // BeginBlocker of epochs module. -func (k Keeper) BeginBlocker(ctx sdk.Context) { +func (k Keeper) BeginBlocker(ctx sdk.Context) error { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + k.IterateEpochInfo(ctx, func(index int64, epochInfo types.EpochInfo) (stop bool) { logger := k.Logger(ctx) @@ -62,4 +63,6 @@ func (k Keeper) BeginBlocker(ctx sdk.Context) { return false }) + + return nil } diff --git a/x/epochs/keeper/abci_test.go b/x/epochs/keeper/abci_test.go index c0f959e..1d77ea0 100644 --- a/x/epochs/keeper/abci_test.go +++ b/x/epochs/keeper/abci_test.go @@ -35,7 +35,8 @@ func TestEpochInfoChangesBeginBlockerAndInitGenesis(t *testing.T) { expInitialEpochStartTime: now, fn: func() { ctx = ctx.WithBlockHeight(2).WithBlockTime(now.Add(time.Second)) - epochsKeeper.BeginBlocker(ctx) + err := epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") require.NotNil(t, epochInfo) }, @@ -47,7 +48,8 @@ func TestEpochInfoChangesBeginBlockerAndInitGenesis(t *testing.T) { expInitialEpochStartTime: now, fn: func() { ctx = ctx.WithBlockHeight(2).WithBlockTime(now.Add(time.Second)) - epochsKeeper.BeginBlocker(ctx) + err := epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") require.NotNil(t, epochInfo) }, @@ -59,9 +61,11 @@ func TestEpochInfoChangesBeginBlockerAndInitGenesis(t *testing.T) { expInitialEpochStartTime: now, fn: func() { ctx = ctx.WithBlockHeight(2).WithBlockTime(now.Add(time.Second)) - epochsKeeper.BeginBlocker(ctx) + err := epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) ctx = ctx.WithBlockHeight(3).WithBlockTime(now.Add(time.Hour * 24 * 31)) - epochsKeeper.BeginBlocker(ctx) + err = epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") require.NotNil(t, epochInfo) }, @@ -74,9 +78,11 @@ func TestEpochInfoChangesBeginBlockerAndInitGenesis(t *testing.T) { expInitialEpochStartTime: now, fn: func() { ctx = ctx.WithBlockHeight(2).WithBlockTime(now.Add(time.Second)) - epochsKeeper.BeginBlocker(ctx) + err := epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) ctx = ctx.WithBlockHeight(3).WithBlockTime(now.Add(time.Hour * 24 * 32)) - epochsKeeper.BeginBlocker(ctx) + err = epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") require.NotNil(t, epochInfo) }, @@ -88,11 +94,14 @@ func TestEpochInfoChangesBeginBlockerAndInitGenesis(t *testing.T) { expInitialEpochStartTime: now, fn: func() { ctx = ctx.WithBlockHeight(2).WithBlockTime(now.Add(time.Second)) - epochsKeeper.BeginBlocker(ctx) + err := epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) ctx = ctx.WithBlockHeight(3).WithBlockTime(now.Add(time.Hour * 24 * 32)) - epochsKeeper.BeginBlocker(ctx) + err = epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) ctx.WithBlockHeight(4).WithBlockTime(now.Add(time.Hour * 24 * 33)) - epochsKeeper.BeginBlocker(ctx) + err = epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") require.NotNil(t, epochInfo) }, @@ -104,11 +113,14 @@ func TestEpochInfoChangesBeginBlockerAndInitGenesis(t *testing.T) { expInitialEpochStartTime: now, fn: func() { ctx = ctx.WithBlockHeight(2).WithBlockTime(now.Add(time.Second)) - epochsKeeper.BeginBlocker(ctx) + err := epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) ctx = ctx.WithBlockHeight(3).WithBlockTime(now.Add(time.Hour * 24 * 32)) - epochsKeeper.BeginBlocker(ctx) + err = epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) ctx.WithBlockHeight(4).WithBlockTime(now.Add(time.Hour * 24 * 33)) - epochsKeeper.BeginBlocker(ctx) + err = epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") require.NotNil(t, epochInfo) }, @@ -192,7 +204,8 @@ func TestEpochStartingOneMonthAfterInitGenesis(t *testing.T) { // after 1 week ctx = ctx.WithBlockHeight(2).WithBlockTime(now.Add(week)) - epochsKeeper.BeginBlocker(ctx) + err := epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) // epoch not started yet epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") @@ -204,7 +217,8 @@ func TestEpochStartingOneMonthAfterInitGenesis(t *testing.T) { // after 1 month ctx = ctx.WithBlockHeight(3).WithBlockTime(now.Add(month)) - epochsKeeper.BeginBlocker(ctx) + err = epochsKeeper.BeginBlocker(ctx) + require.NoError(t, err) // epoch started epochInfo = epochsKeeper.GetEpochInfo(ctx, "monthly") diff --git a/x/epochs/keeper/epoch.go b/x/epochs/keeper/epoch.go index ae6bbdd..5915bf4 100644 --- a/x/epochs/keeper/epoch.go +++ b/x/epochs/keeper/epoch.go @@ -4,11 +4,11 @@ import ( "fmt" "time" + "cosmossdk.io/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/gogoproto/proto" "github.com/sagaxyz/ssc/x/epochs/types" - - sdk "github.com/cosmos/cosmos-sdk/types" ) // GetEpochInfo returns epoch info by identifier. @@ -66,9 +66,9 @@ func (k Keeper) DeleteEpochInfo(ctx sdk.Context, identifier string) { // IterateEpochInfo iterate through epochs. func (k Keeper) IterateEpochInfo(ctx sdk.Context, fn func(index int64, epochInfo types.EpochInfo) (stop bool)) { - store := ctx.KVStore(k.storeKey) + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixEpoch) - iterator := sdk.KVStorePrefixIterator(store, types.KeyPrefixEpoch) + iterator := store.Iterator(nil, nil) defer iterator.Close() i := int64(0) diff --git a/x/epochs/keeper/keeper.go b/x/epochs/keeper/keeper.go index 7cec6b0..1be681f 100644 --- a/x/epochs/keeper/keeper.go +++ b/x/epochs/keeper/keeper.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/sagaxyz/ssc/x/epochs/types" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/epochs/module.go b/x/epochs/module.go index 8d6cba8..c6da69c 100644 --- a/x/epochs/module.go +++ b/x/epochs/module.go @@ -103,6 +103,9 @@ type AppModule struct { keeper keeper.Keeper } +func (am AppModule) IsOnePerModuleType() {} +func (am AppModule) IsAppModule() {} + func NewAppModule(keeper keeper.Keeper) AppModule { return AppModule{ AppModuleBasic: NewAppModuleBasic(), @@ -143,14 +146,14 @@ 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) { - am.keeper.BeginBlocker(ctx) +func (am AppModule) BeginBlock(ctx context.Context) error { + return am.keeper.BeginBlocker(sdk.UnwrapSDKContext(ctx)) } // 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 { - return []abci.ValidatorUpdate{} +func (am AppModule) EndBlock(ctx context.Context) error { + return nil } // ConsensusVersion implements AppModule/ConsensusVersion. diff --git a/x/epochs/types/hooks.go b/x/epochs/types/hooks.go index cfa662c..97976ed 100644 --- a/x/epochs/types/hooks.go +++ b/x/epochs/types/hooks.go @@ -3,7 +3,7 @@ package types import ( "errors" fmt "fmt" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" "runtime" "runtime/debug" diff --git a/x/escrow/client/cli/query_balance.go b/x/escrow/client/cli/query_balance.go index 10a1374..4adb3c9 100644 --- a/x/escrow/client/cli/query_balance.go +++ b/x/escrow/client/cli/query_balance.go @@ -2,7 +2,6 @@ package cli import ( "fmt" - "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -10,8 +9,6 @@ import ( "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdBalance() *cobra.Command { cmd := &cobra.Command{ Use: "balance [address]", diff --git a/x/escrow/client/cli/query_get_chainlet_account.go b/x/escrow/client/cli/query_get_chainlet_account.go index 1bf06a0..bb5d8aa 100644 --- a/x/escrow/client/cli/query_get_chainlet_account.go +++ b/x/escrow/client/cli/query_get_chainlet_account.go @@ -1,16 +1,12 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/sagaxyz/ssc/x/escrow/types" "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdGetChainletAccount() *cobra.Command { cmd := &cobra.Command{ Use: "get-chainlet-account [chain-id]", diff --git a/x/escrow/client/cli/tx_deposit.go b/x/escrow/client/cli/tx_deposit.go index 7c3069c..d4eff90 100644 --- a/x/escrow/client/cli/tx_deposit.go +++ b/x/escrow/client/cli/tx_deposit.go @@ -1,8 +1,6 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -10,8 +8,6 @@ import ( "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdDeposit() *cobra.Command { cmd := &cobra.Command{ Use: "deposit [amount] [chainid]", diff --git a/x/escrow/client/cli/tx_withdraw.go b/x/escrow/client/cli/tx_withdraw.go index 19d0bfc..68fc0b7 100644 --- a/x/escrow/client/cli/tx_withdraw.go +++ b/x/escrow/client/cli/tx_withdraw.go @@ -1,8 +1,6 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -10,8 +8,6 @@ import ( "github.com/spf13/cobra" ) -var _ = strconv.Itoa(0) - func CmdWithdraw() *cobra.Command { cmd := &cobra.Command{ Use: "withdraw [chainId]", diff --git a/x/escrow/keeper/escrow.go b/x/escrow/keeper/escrow.go index e7acabc..13577bf 100644 --- a/x/escrow/keeper/escrow.go +++ b/x/escrow/keeper/escrow.go @@ -6,7 +6,7 @@ import ( cosmossdkerrors "cosmossdk.io/errors" "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sagaxyz/ssc/x/escrow/types" @@ -65,7 +65,7 @@ func (k Keeper) deposit(ctx sdk.Context, address sdk.AccAddress, amount sdk.Coin } if chainlet.Balance.Amount.Equal(math.ZeroInt()) { - chainlet.Shares = sdk.ZeroDec() + chainlet.Shares = math.LegacyZeroDec() chainlet.Funders = make(map[string]types.Funder) } @@ -77,7 +77,7 @@ func (k Keeper) deposit(ctx sdk.Context, address sdk.AccAddress, amount sdk.Coin // Calculation of shares: https://docs.cosmos.network/v0.47/modules/staking#how-shares-are-calculated // S_j = S * T_j / T // Implementation Example: https://github.com/cosmos/cosmos-sdk/blob/bfba5491f39f0e0af100480a3194a30c2dc4b9c3/x/staking/types/validator.go#L326 - var newShares sdk.Dec + var newShares math.LegacyDec if chainlet.Balance.IsPositive() { newShares = chainlet.Shares.MulInt(amount.Amount).QuoInt(chainlet.Balance.Amount) } else if chainlet.Balance.IsZero() { @@ -230,16 +230,16 @@ func (k Keeper) BillAccount(ctx sdk.Context, amount sdk.Coin, chainId string, to return nil } -func ScalingFactor(chainlet types.ChainletAccount) sdk.Dec { +func ScalingFactor(chainlet types.ChainletAccount) math.LegacyDec { totalPoolShares := chainlet.Shares decCoins, _ := sdk.ParseDecCoin(chainlet.Balance.String()) totalDeposit := decCoins.Amount if totalDeposit.IsZero() { - return sdk.MustNewDecFromStr("1") + return math.LegacyMustNewDecFromStr("1") } return totalPoolShares.Quo(totalDeposit) } -func InverseScalingFactor(chainlet types.ChainletAccount) sdk.Dec { - return sdk.NewDec(int64(1)).Quo(ScalingFactor(chainlet)) +func InverseScalingFactor(chainlet types.ChainletAccount) math.LegacyDec { + return math.LegacyNewDec(int64(1)).Quo(ScalingFactor(chainlet)) } diff --git a/x/escrow/keeper/grpc_query_balance.go b/x/escrow/keeper/grpc_query_balance.go index d385a7c..6eb157e 100644 --- a/x/escrow/keeper/grpc_query_balance.go +++ b/x/escrow/keeper/grpc_query_balance.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sagaxyz/ssc/x/escrow/types" "google.golang.org/grpc/codes" diff --git a/x/escrow/keeper/keeper.go b/x/escrow/keeper/keeper.go index a41f01d..fc0d35d 100644 --- a/x/escrow/keeper/keeper.go +++ b/x/escrow/keeper/keeper.go @@ -3,9 +3,9 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/sagaxyz/ssc/x/escrow/types" @@ -15,7 +15,6 @@ type ( Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey - memKey storetypes.StoreKey paramstore paramtypes.Subspace bankKeeper types.BankKeeper billingKeeper types.BillingKeeper @@ -24,8 +23,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, - storeKey, - memKey storetypes.StoreKey, + storeKey storetypes.StoreKey, ps paramtypes.Subspace, bk types.BankKeeper, billingKeeper types.BillingKeeper, @@ -39,7 +37,6 @@ func NewKeeper( return &Keeper{ cdc: cdc, storeKey: storeKey, - memKey: memKey, paramstore: ps, bankKeeper: bk, billingKeeper: billingKeeper, diff --git a/x/escrow/module.go b/x/escrow/module.go index 7808901..603acb6 100644 --- a/x/escrow/module.go +++ b/x/escrow/module.go @@ -115,6 +115,9 @@ func NewAppModule( } } +func (am AppModule) IsOnePerModuleType() {} +func (am AppModule) IsAppModule() {} + // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) @@ -145,9 +148,11 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} +func (am AppModule) BeginBlock(_ context.Context) error { + return nil +} // EndBlock contains the logic that is automatically triggered at the end of each block -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} +func (am AppModule) EndBlock(_ context.Context) error { + return nil } diff --git a/x/escrow/module_simulation.go b/x/escrow/module_simulation.go index 4b99fb7..267c378 100644 --- a/x/escrow/module_simulation.go +++ b/x/escrow/module_simulation.go @@ -4,7 +4,6 @@ import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" @@ -51,15 +50,12 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP return nil } -// RegisterStoreDecoder registers a decoder -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 { operations := make([]simtypes.WeightedOperation, 0) var weightMsgDeposit int - simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgDeposit, &weightMsgDeposit, nil, + simState.AppParams.GetOrGenerate(opWeightMsgDeposit, &weightMsgDeposit, nil, func(_ *rand.Rand) { weightMsgDeposit = defaultWeightMsgDeposit }, @@ -70,7 +66,7 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp )) var weightMsgWithdraw int - simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgWithdraw, &weightMsgWithdraw, nil, + simState.AppParams.GetOrGenerate(opWeightMsgWithdraw, &weightMsgWithdraw, nil, func(_ *rand.Rand) { weightMsgWithdraw = defaultWeightMsgWithdraw }, diff --git a/x/escrow/testutil/expected_keepers_mocks.go b/x/escrow/testutil/expected_keepers_mocks.go index 4138826..0343460 100644 --- a/x/escrow/testutil/expected_keepers_mocks.go +++ b/x/escrow/testutil/expected_keepers_mocks.go @@ -5,10 +5,10 @@ package testutil import ( + context "context" reflect "reflect" types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/auth/types" gomock "github.com/golang/mock/gomock" ) @@ -36,10 +36,10 @@ func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { } // GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) types0.AccountI { +func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types0.AccountI) + ret0, _ := ret[0].(types.AccountI) return ret0 } @@ -73,7 +73,7 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { } // SendCoinsFromAccountToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { +func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) ret0, _ := ret[0].(error) @@ -87,7 +87,7 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAd } // SendCoinsFromModuleToAccount mocks base method. -func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) ret0, _ := ret[0].(error) @@ -101,7 +101,7 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderMo } // SendCoinsFromModuleToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types.Context, senderModule, recipientModule string, amt types.Coins) error { +func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) ret0, _ := ret[0].(error) @@ -115,7 +115,7 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderMod } // SpendableCoins mocks base method. -func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins { +func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) ret0, _ := ret[0].(types.Coins) diff --git a/x/escrow/types/chainlet_account.pb.go b/x/escrow/types/chainlet_account.pb.go index e3dc235..0746f33 100644 --- a/x/escrow/types/chainlet_account.pb.go +++ b/x/escrow/types/chainlet_account.pb.go @@ -4,9 +4,9 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -27,10 +27,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ChainletAccount struct { - ChainId string `protobuf:"bytes,1,opt,name=chainId,proto3" json:"chainId,omitempty"` - Balance types.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` - Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` - Funders map[string]Funder `protobuf:"bytes,4,rep,name=funders,proto3" json:"funders" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ChainId string `protobuf:"bytes,1,opt,name=chainId,proto3" json:"chainId,omitempty"` + Balance types.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` + Shares cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"shares"` + Funders map[string]Funder `protobuf:"bytes,4,rep,name=funders,proto3" json:"funders" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *ChainletAccount) Reset() { *m = ChainletAccount{} } @@ -88,7 +88,7 @@ func (m *ChainletAccount) GetFunders() map[string]Funder { } type Funder struct { - Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` + Shares cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=shares,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"shares"` } func (m *Funder) Reset() { *m = Funder{} } @@ -133,32 +133,32 @@ func init() { func init() { proto.RegisterFile("ssc/escrow/chainlet_account.proto", fileDescriptor_229301979046d517) } var fileDescriptor_229301979046d517 = []byte{ - // 390 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xcd, 0x6e, 0xda, 0x40, - 0x18, 0xf4, 0x02, 0x05, 0x75, 0xa9, 0xd4, 0x6a, 0xd5, 0x83, 0xe1, 0x60, 0x28, 0x52, 0x2b, 0x5f, - 0xd8, 0x15, 0xf4, 0xd2, 0x56, 0x95, 0xaa, 0x02, 0x89, 0x92, 0x4b, 0x0e, 0x56, 0x4e, 0x39, 0x04, - 0xad, 0x97, 0x8d, 0xb1, 0x00, 0x2f, 0xf2, 0xda, 0x04, 0xe7, 0x29, 0xf2, 0x30, 0x79, 0x08, 0x8e, - 0x28, 0x87, 0x28, 0xca, 0x01, 0x45, 0xf0, 0x22, 0x91, 0xbd, 0x6b, 0xc5, 0xca, 0x39, 0xa7, 0xfd, - 0x99, 0xf9, 0x66, 0xbe, 0xf9, 0xf4, 0xc1, 0x6f, 0x52, 0x32, 0xc2, 0x25, 0x0b, 0xc5, 0x35, 0x61, - 0x53, 0xea, 0x07, 0x73, 0x1e, 0x8d, 0x29, 0x63, 0x22, 0x0e, 0x22, 0xbc, 0x0c, 0x45, 0x24, 0x10, - 0x94, 0x92, 0x61, 0x45, 0x69, 0x7e, 0xf5, 0x84, 0x27, 0xb2, 0x6f, 0x92, 0xde, 0x14, 0xa3, 0x69, - 0x31, 0x21, 0x17, 0x42, 0x12, 0x97, 0x4a, 0x4e, 0x56, 0x3d, 0x97, 0x47, 0xb4, 0x47, 0x98, 0xf0, - 0x03, 0x8d, 0x37, 0x14, 0x3e, 0x56, 0x85, 0xea, 0xa1, 0xa0, 0xce, 0x43, 0x09, 0x7e, 0x1e, 0x6a, - 0xdf, 0xff, 0xca, 0x16, 0x99, 0xb0, 0x96, 0xb5, 0x72, 0x3a, 0x31, 0x41, 0x1b, 0xd8, 0x1f, 0x9d, - 0xfc, 0x89, 0x7e, 0xc3, 0x9a, 0x4b, 0xe7, 0x34, 0x60, 0xdc, 0x2c, 0xb5, 0x81, 0x5d, 0xef, 0x37, - 0xb0, 0x56, 0x4b, 0xad, 0xb1, 0xb6, 0xc6, 0x43, 0xe1, 0x07, 0x83, 0xca, 0x66, 0xd7, 0x32, 0x9c, - 0x9c, 0x8f, 0xce, 0x61, 0x55, 0x4e, 0x69, 0xc8, 0xa5, 0x59, 0x4e, 0x35, 0x07, 0x7f, 0x53, 0xf8, - 0x69, 0xd7, 0xfa, 0xe1, 0xf9, 0xd1, 0x34, 0x76, 0x31, 0x13, 0x0b, 0xdd, 0x99, 0x3e, 0xba, 0x72, - 0x32, 0x23, 0x51, 0xb2, 0xe4, 0x12, 0x8f, 0x38, 0xbb, 0xbf, 0xeb, 0x42, 0x6d, 0x35, 0xe2, 0xcc, - 0xd1, 0x5a, 0xe8, 0x04, 0xd6, 0xae, 0xe2, 0x60, 0xc2, 0x43, 0x69, 0x56, 0xda, 0x65, 0xbb, 0xde, - 0xb7, 0xf1, 0xeb, 0xb4, 0xf0, 0x9b, 0x60, 0xf8, 0x58, 0x51, 0x8f, 0x82, 0x28, 0x4c, 0xf2, 0xfe, - 0x74, 0x79, 0xf3, 0x0c, 0x7e, 0x2a, 0xc2, 0xe8, 0x0b, 0x2c, 0xcf, 0x78, 0xa2, 0x07, 0x90, 0x5e, - 0x91, 0x0d, 0x3f, 0xac, 0xe8, 0x3c, 0xce, 0xa3, 0xa3, 0xa2, 0x93, 0x2a, 0x75, 0x14, 0xe1, 0x4f, - 0xe9, 0x17, 0xe8, 0x5c, 0xc2, 0xaa, 0xfa, 0x2c, 0x24, 0x07, 0xef, 0x97, 0x7c, 0xf0, 0x6f, 0xb3, - 0xb7, 0xc0, 0x76, 0x6f, 0x81, 0xe7, 0xbd, 0x05, 0x6e, 0x0f, 0x96, 0xb1, 0x3d, 0x58, 0xc6, 0xe3, - 0xc1, 0x32, 0x2e, 0xbe, 0x17, 0x74, 0x25, 0xf5, 0xe8, 0x3a, 0xb9, 0x21, 0xe9, 0x96, 0xad, 0xf3, - 0x3d, 0xcb, 0xa4, 0xdd, 0x6a, 0xb6, 0x00, 0x3f, 0x5f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x5f, - 0x28, 0x79, 0x82, 0x02, 0x00, 0x00, + // 392 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0x41, 0x6f, 0xda, 0x30, + 0x14, 0x8e, 0x81, 0x81, 0x66, 0x26, 0x6d, 0xb2, 0x76, 0x08, 0x4c, 0x0a, 0x0c, 0x69, 0x52, 0x2e, + 0xb3, 0x05, 0xbb, 0x6c, 0xbb, 0x4c, 0x03, 0x36, 0x15, 0xa9, 0xea, 0x21, 0xbd, 0xf5, 0x82, 0x1c, + 0xe3, 0x26, 0x11, 0x10, 0xa3, 0xd8, 0xa1, 0xa4, 0xbf, 0xa2, 0x3f, 0xa6, 0x3f, 0x02, 0xa9, 0x17, + 0xd4, 0x53, 0xd5, 0x03, 0xaa, 0xe0, 0x8f, 0x54, 0xc1, 0x8e, 0x8a, 0x7a, 0xed, 0xcd, 0xef, 0x7d, + 0xdf, 0xfb, 0xbe, 0xf7, 0x25, 0x0f, 0x7e, 0x95, 0x92, 0x11, 0x2e, 0x59, 0x22, 0xae, 0x08, 0x0b, + 0x69, 0x14, 0xcf, 0xb8, 0x1a, 0x53, 0xc6, 0x44, 0x1a, 0x2b, 0xbc, 0x48, 0x84, 0x12, 0x08, 0x4a, + 0xc9, 0xb0, 0xa6, 0x34, 0x3f, 0x07, 0x22, 0x10, 0x87, 0x36, 0xc9, 0x5f, 0x9a, 0xd1, 0x74, 0x98, + 0x90, 0x73, 0x21, 0x89, 0x4f, 0x25, 0x27, 0xcb, 0xae, 0xcf, 0x15, 0xed, 0x12, 0x26, 0xa2, 0xd8, + 0xe0, 0x0d, 0x8d, 0x8f, 0xf5, 0xa0, 0x2e, 0x34, 0xd4, 0xb9, 0x2b, 0xc1, 0x8f, 0x03, 0xe3, 0xfb, + 0x57, 0xdb, 0x22, 0x1b, 0xd6, 0x0e, 0xab, 0x8c, 0x26, 0x36, 0x68, 0x03, 0xf7, 0xbd, 0x57, 0x94, + 0xe8, 0x17, 0xac, 0xf9, 0x74, 0x46, 0x63, 0xc6, 0xed, 0x52, 0x1b, 0xb8, 0xf5, 0x5e, 0x03, 0x1b, + 0xb5, 0xdc, 0x1a, 0x1b, 0x6b, 0x3c, 0x10, 0x51, 0xdc, 0xaf, 0xac, 0xb7, 0x2d, 0xcb, 0x2b, 0xf8, + 0x68, 0x04, 0xab, 0x32, 0xa4, 0x09, 0x97, 0x76, 0x39, 0xd7, 0xec, 0x77, 0x73, 0xf8, 0x71, 0xdb, + 0xfa, 0xa2, 0x05, 0xe4, 0x64, 0x8a, 0x23, 0x41, 0xe6, 0x54, 0x85, 0xf8, 0x94, 0x07, 0x94, 0x65, + 0x43, 0xce, 0xee, 0x6f, 0xbf, 0x43, 0xa3, 0x3f, 0xe4, 0xcc, 0x33, 0x02, 0xe8, 0x04, 0xd6, 0x2e, + 0xd3, 0x78, 0xc2, 0x13, 0x69, 0x57, 0xda, 0x65, 0xb7, 0xde, 0x73, 0xf1, 0xcb, 0x27, 0xc2, 0xaf, + 0xd2, 0xe0, 0xff, 0x9a, 0xfa, 0x2f, 0x56, 0x49, 0x56, 0x2c, 0x65, 0xc6, 0x9b, 0x67, 0xf0, 0xc3, + 0x31, 0x8c, 0x3e, 0xc1, 0xf2, 0x94, 0x67, 0x26, 0x75, 0xfe, 0x44, 0x2e, 0x7c, 0xb7, 0xa4, 0xb3, + 0xb4, 0xc8, 0x8b, 0x8e, 0x9d, 0xf4, 0xa8, 0xa7, 0x09, 0xbf, 0x4b, 0x3f, 0x41, 0xe7, 0x1c, 0x56, + 0x75, 0xf3, 0x28, 0x2e, 0x78, 0x63, 0xdc, 0xfe, 0x9f, 0xf5, 0xce, 0x01, 0x9b, 0x9d, 0x03, 0x9e, + 0x76, 0x0e, 0xb8, 0xd9, 0x3b, 0xd6, 0x66, 0xef, 0x58, 0x0f, 0x7b, 0xc7, 0xba, 0xf8, 0x16, 0x44, + 0x2a, 0x4c, 0x7d, 0xcc, 0xc4, 0x9c, 0x48, 0x1a, 0xd0, 0x55, 0x76, 0x4d, 0xf2, 0x7b, 0x5a, 0x15, + 0x17, 0xa5, 0xb2, 0x05, 0x97, 0x7e, 0xf5, 0xf0, 0xab, 0x7f, 0x3c, 0x07, 0x00, 0x00, 0xff, 0xff, + 0xc8, 0xf8, 0xac, 0xcc, 0x6c, 0x02, 0x00, 0x00, } func (m *ChainletAccount) Marshal() (dAtA []byte, err error) { diff --git a/x/escrow/types/expected_keepers.go b/x/escrow/types/expected_keepers.go index 98d4634..c2ec856 100644 --- a/x/escrow/types/expected_keepers.go +++ b/x/escrow/types/expected_keepers.go @@ -1,23 +1,24 @@ package types import ( + "context" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeper defines the expected account keeper used for simulations (noalias) type AccountKeeper interface { - GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // Methods imported from account should be defined here } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins // Methods imported from bank should be defined here } diff --git a/x/escrow/types/message_deposit.go b/x/escrow/types/message_deposit.go index ff73be4..cb9189a 100644 --- a/x/escrow/types/message_deposit.go +++ b/x/escrow/types/message_deposit.go @@ -26,19 +26,6 @@ func (msg *MsgDeposit) Type() string { return TypeMsgDeposit } -func (msg *MsgDeposit) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgDeposit) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - func (msg *MsgDeposit) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { @@ -48,8 +35,7 @@ func (msg *MsgDeposit) ValidateBasic() error { if err != nil { return cosmossdkerrors.Wrapf(ErrInvalidCoin, "invalid coin (%s)", msg.Amount) } - - if !coin.Amount.GT(sdk.ZeroInt()) { + if !coin.Amount.IsPositive() { return cosmossdkerrors.Wrapf(ErrInvalidCoin, "must send more than 0 coins (%s)", coin.Amount.String()) } return nil diff --git a/x/escrow/types/message_withdraw.go b/x/escrow/types/message_withdraw.go index 7526d22..35e8023 100644 --- a/x/escrow/types/message_withdraw.go +++ b/x/escrow/types/message_withdraw.go @@ -25,19 +25,6 @@ func (msg *MsgWithdraw) Type() string { return TypeMsgWithdraw } -func (msg *MsgWithdraw) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgWithdraw) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - func (msg *MsgWithdraw) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { diff --git a/x/escrow/types/tx.pb.go b/x/escrow/types/tx.pb.go index 976a4a8..045447a 100644 --- a/x/escrow/types/tx.pb.go +++ b/x/escrow/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -221,24 +222,26 @@ func init() { func init() { proto.RegisterFile("ssc/escrow/tx.proto", fileDescriptor_fc98b6778d83a40e) } var fileDescriptor_fc98b6778d83a40e = []byte{ - // 270 bytes of a gzipped FileDescriptorProto + // 304 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0x2e, 0x4e, 0xd6, 0x4f, 0x2d, 0x4e, 0x2e, 0xca, 0x2f, 0xd7, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, - 0xe2, 0x2a, 0x2e, 0x4e, 0xd6, 0x83, 0x08, 0x2a, 0x45, 0x70, 0x71, 0xf9, 0x16, 0xa7, 0xbb, 0xa4, - 0x16, 0xe4, 0x17, 0x67, 0x96, 0x08, 0x49, 0x70, 0xb1, 0x27, 0x17, 0xa5, 0x26, 0x96, 0xe4, 0x17, - 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0xc1, 0xb8, 0x42, 0x62, 0x5c, 0x6c, 0x89, 0xb9, 0xf9, - 0xa5, 0x79, 0x25, 0x12, 0x4c, 0x60, 0x09, 0x28, 0x0f, 0xac, 0x23, 0x23, 0x31, 0x33, 0xcf, 0x33, - 0x45, 0x82, 0x19, 0xaa, 0x03, 0xc2, 0x55, 0x12, 0xe1, 0x12, 0x42, 0x98, 0x1c, 0x94, 0x5a, 0x5c, - 0x90, 0x9f, 0x57, 0x9c, 0xaa, 0xe4, 0xc8, 0xc5, 0xed, 0x5b, 0x9c, 0x1e, 0x9e, 0x59, 0x92, 0x91, - 0x52, 0x94, 0x58, 0x8e, 0xc7, 0x42, 0x24, 0x83, 0x99, 0x50, 0x0d, 0x16, 0xe5, 0x12, 0x46, 0x32, - 0x02, 0x66, 0xb2, 0x51, 0x1f, 0x23, 0x17, 0xb3, 0x6f, 0x71, 0xba, 0x90, 0x23, 0x17, 0x3b, 0xcc, - 0x3b, 0x62, 0x7a, 0x08, 0x9f, 0xea, 0x21, 0x1c, 0x23, 0x25, 0x87, 0x5d, 0x1c, 0x66, 0x94, 0x90, - 0x0b, 0x17, 0x07, 0xdc, 0x85, 0xe2, 0x68, 0x6a, 0x61, 0x12, 0x52, 0xf2, 0x38, 0x24, 0x60, 0xa6, - 0x38, 0xd9, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, - 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x6a, 0x7a, 0x66, - 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x62, 0x7a, 0x62, 0x45, 0x65, 0x95, - 0x3e, 0x28, 0xa2, 0x2a, 0xe0, 0x51, 0x55, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x8e, 0x2e, 0x63, - 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x65, 0x5b, 0x0d, 0xfe, 0xc5, 0x01, 0x00, 0x00, + 0xe2, 0x2a, 0x2e, 0x4e, 0xd6, 0x83, 0x08, 0x4a, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb, + 0xe7, 0x16, 0xa7, 0xeb, 0x97, 0x19, 0x82, 0x28, 0x88, 0x22, 0xa5, 0x34, 0x2e, 0x2e, 0xdf, 0xe2, + 0x74, 0x97, 0xd4, 0x82, 0xfc, 0xe2, 0xcc, 0x12, 0x21, 0x09, 0x2e, 0xf6, 0xe4, 0xa2, 0xd4, 0xc4, + 0x92, 0xfc, 0x22, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x8c, 0x8b, 0x2d, + 0x31, 0x37, 0xbf, 0x34, 0xaf, 0x44, 0x82, 0x09, 0x2c, 0x01, 0xe5, 0x81, 0x75, 0x64, 0x24, 0x66, + 0xe6, 0x79, 0xa6, 0x48, 0x30, 0x43, 0x75, 0x40, 0xb8, 0x56, 0x3c, 0x4d, 0xcf, 0x37, 0x68, 0xc1, + 0xf4, 0x2b, 0x89, 0x70, 0x09, 0x21, 0xec, 0x09, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x55, + 0xf2, 0xe7, 0xe2, 0xf6, 0x2d, 0x4e, 0x0f, 0xcf, 0x2c, 0xc9, 0x48, 0x29, 0x4a, 0x2c, 0xc7, 0x63, + 0x3d, 0x92, 0x35, 0x4c, 0xf8, 0xac, 0x11, 0xe5, 0x12, 0x46, 0x32, 0x10, 0x66, 0x8f, 0xd1, 0x54, + 0x46, 0x2e, 0x66, 0xdf, 0xe2, 0x74, 0x21, 0x47, 0x2e, 0x76, 0x98, 0x57, 0xc5, 0xf4, 0x10, 0xc1, + 0xa3, 0x87, 0x70, 0x9a, 0x94, 0x1c, 0x76, 0x71, 0x98, 0x51, 0x42, 0x2e, 0x5c, 0x1c, 0x70, 0xf7, + 0x8a, 0xa3, 0xa9, 0x85, 0x49, 0x48, 0xc9, 0xe3, 0x90, 0x80, 0x99, 0x22, 0xc5, 0xda, 0xf0, 0x7c, + 0x83, 0x16, 0xa3, 0x93, 0xfd, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, + 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xa9, + 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x17, 0x27, 0xa6, 0x27, 0x56, + 0x54, 0x56, 0xe9, 0x83, 0x22, 0xb9, 0x02, 0x1e, 0xcd, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, + 0x58, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x64, 0x8d, 0xc4, 0x01, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/peers/client/cli/query_peers.go b/x/peers/client/cli/query_peers.go index d77aa76..2ae7458 100644 --- a/x/peers/client/cli/query_peers.go +++ b/x/peers/client/cli/query_peers.go @@ -1,8 +1,6 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" @@ -10,8 +8,6 @@ import ( "github.com/sagaxyz/ssc/x/peers/types" ) -var _ = strconv.Itoa(0) - func CmdQueryPeers() *cobra.Command { cmd := &cobra.Command{ Use: "peers [chain-id]", diff --git a/x/peers/keeper/data.go b/x/peers/keeper/data.go index 788df6f..4924777 100644 --- a/x/peers/keeper/data.go +++ b/x/peers/keeper/data.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sagaxyz/ssc/x/peers/types" diff --git a/x/peers/keeper/keeper.go b/x/peers/keeper/keeper.go index cbb36ab..6c45c76 100644 --- a/x/peers/keeper/keeper.go +++ b/x/peers/keeper/keeper.go @@ -3,9 +3,9 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -15,7 +15,6 @@ import ( type Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey - memKey storetypes.StoreKey paramstore paramtypes.Subspace chainletKeeper types.ChainletKeeper @@ -23,8 +22,7 @@ type Keeper struct { func New( cdc codec.BinaryCodec, - storeKey, - memKey storetypes.StoreKey, + storeKey storetypes.StoreKey, ps paramtypes.Subspace, ck types.ChainletKeeper, ) Keeper { @@ -34,10 +32,9 @@ func New( } return Keeper{ - cdc: cdc, - storeKey: storeKey, - memKey: memKey, - paramstore: ps, + cdc: cdc, + storeKey: storeKey, + paramstore: ps, chainletKeeper: ck, } } diff --git a/x/peers/module.go b/x/peers/module.go index 685cd76..a894d30 100644 --- a/x/peers/module.go +++ b/x/peers/module.go @@ -108,6 +108,9 @@ func NewAppModule( } } +func (am AppModule) IsOnePerModuleType() {} +func (am AppModule) IsAppModule() {} + // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) @@ -144,11 +147,11 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 3 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { - //am.keeper.BeginBlock(ctx, req) +func (am AppModule) BeginBlock(ctx context.Context) error { + return nil } // EndBlock contains the logic that is automatically triggered at the end of each block -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} +func (am AppModule) EndBlock(_ context.Context) error { + return nil } diff --git a/x/peers/types/message_set_peers.go b/x/peers/types/message_set_peers.go index 08f616c..644e1ef 100644 --- a/x/peers/types/message_set_peers.go +++ b/x/peers/types/message_set_peers.go @@ -26,19 +26,6 @@ func (msg *MsgSetPeers) Type() string { return TypeMsgSetPeers } -func (msg *MsgSetPeers) GetSigners() []sdk.AccAddress { - v, err := sdk.AccAddressFromBech32(msg.Validator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{v} -} - -func (msg *MsgSetPeers) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - func (msg *MsgSetPeers) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Validator) if err != nil { diff --git a/x/peers/types/tx.pb.go b/x/peers/types/tx.pb.go index 0375acd..efcc656 100644 --- a/x/peers/types/tx.pb.go +++ b/x/peers/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -132,22 +133,24 @@ func init() { func init() { proto.RegisterFile("ssc/peers/tx.proto", fileDescriptor_b30429e7fb7d6e37) } var fileDescriptor_b30429e7fb7d6e37 = []byte{ - // 236 bytes of a gzipped FileDescriptorProto + // 270 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2a, 0x2e, 0x4e, 0xd6, 0x2f, 0x48, 0x4d, 0x2d, 0x2a, 0xd6, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2c, 0x2e, 0x4e, 0xd6, 0x03, 0x8b, 0x49, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x45, 0xf5, 0x41, - 0x2c, 0x88, 0x02, 0xa5, 0x68, 0x2e, 0x6e, 0xdf, 0xe2, 0xf4, 0xe0, 0xd4, 0x92, 0x00, 0x90, 0x22, - 0x21, 0x19, 0x2e, 0xce, 0xb2, 0xc4, 0x9c, 0xcc, 0x94, 0xc4, 0x92, 0xfc, 0x22, 0x09, 0x46, 0x05, - 0x46, 0x0d, 0xce, 0x20, 0x84, 0x80, 0x90, 0x04, 0x17, 0x7b, 0x72, 0x46, 0x62, 0x66, 0x9e, 0x67, - 0x8a, 0x04, 0x13, 0x58, 0x0e, 0xc6, 0x15, 0x12, 0xe1, 0x62, 0x05, 0xdb, 0x22, 0xc1, 0xac, 0xc0, - 0xac, 0xc1, 0x19, 0x04, 0xe1, 0x28, 0x89, 0x72, 0x09, 0x23, 0x19, 0x1e, 0x94, 0x5a, 0x5c, 0x90, - 0x9f, 0x57, 0x9c, 0x6a, 0xe4, 0xc9, 0xc5, 0xec, 0x5b, 0x9c, 0x2e, 0xe4, 0xc4, 0xc5, 0x01, 0xb7, - 0x57, 0x4c, 0x0f, 0xee, 0x50, 0x3d, 0x24, 0x2d, 0x52, 0x72, 0xd8, 0xc5, 0x61, 0x46, 0x39, 0xd9, - 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, - 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x4a, 0x7a, 0x66, 0x49, 0x46, - 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x62, 0x7a, 0x62, 0x45, 0x65, 0x95, 0x3e, 0x28, - 0x80, 0x2a, 0x60, 0x41, 0x54, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x05, 0x63, 0x40, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x57, 0x67, 0xf6, 0x21, 0x3c, 0x01, 0x00, 0x00, + 0x2c, 0x88, 0x02, 0x29, 0xf1, 0xe4, 0xfc, 0xe2, 0xdc, 0xfc, 0x62, 0xfd, 0xdc, 0xe2, 0x74, 0xfd, + 0x32, 0x43, 0x10, 0x05, 0x91, 0x50, 0xca, 0xe6, 0xe2, 0xf6, 0x2d, 0x4e, 0x0f, 0x4e, 0x2d, 0x09, + 0x00, 0xe9, 0x16, 0x92, 0xe1, 0xe2, 0x2c, 0x4b, 0xcc, 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f, 0x92, + 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x42, 0x08, 0x08, 0x49, 0x70, 0xb1, 0x27, 0x67, 0x24, 0x66, + 0xe6, 0x79, 0xa6, 0x48, 0x30, 0x81, 0xe5, 0x60, 0x5c, 0x21, 0x11, 0x2e, 0x56, 0xb0, 0xf5, 0x12, + 0xcc, 0x0a, 0xcc, 0x1a, 0x9c, 0x41, 0x10, 0x8e, 0x15, 0x5f, 0xd3, 0xf3, 0x0d, 0x5a, 0x08, 0xfd, + 0x4a, 0xa2, 0x5c, 0xc2, 0x48, 0x96, 0x05, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x1a, 0x05, + 0x70, 0x31, 0xfb, 0x16, 0xa7, 0x0b, 0x39, 0x71, 0x71, 0xc0, 0xdd, 0x21, 0xa6, 0x07, 0xf7, 0x91, + 0x1e, 0x92, 0x16, 0x29, 0x39, 0xec, 0xe2, 0x30, 0xa3, 0xa4, 0x58, 0x1b, 0x9e, 0x6f, 0xd0, 0x62, + 0x74, 0xb2, 0x3b, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, + 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x95, 0xf4, 0xcc, + 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xe2, 0xc4, 0xf4, 0xc4, 0x8a, 0xca, 0x2a, + 0x7d, 0x50, 0x80, 0x56, 0xc0, 0x82, 0xb4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x38, 0xc6, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xdc, 0xd0, 0xf7, 0x6c, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ssc/client/cli/query.go b/x/ssc/client/cli/query.go deleted file mode 100644 index a0f9bc9..0000000 --- a/x/ssc/client/cli/query.go +++ /dev/null @@ -1,31 +0,0 @@ -package cli - -import ( - "fmt" - // "strings" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" - // sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/sagaxyz/ssc/x/ssc/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(queryRoute string) *cobra.Command { - // Group ssc queries under a subcommand - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand(CmdQueryParams()) - // this line is used by starport scaffolding # 1 - - return cmd -} diff --git a/x/ssc/client/cli/query_params.go b/x/ssc/client/cli/query_params.go deleted file mode 100644 index cc2fd47..0000000 --- a/x/ssc/client/cli/query_params.go +++ /dev/null @@ -1,36 +0,0 @@ -package cli - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/sagaxyz/ssc/x/ssc/types" -) - -func CmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "shows the parameters of the module", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/ssc/client/cli/tx.go b/x/ssc/client/cli/tx.go deleted file mode 100644 index 5b2d29d..0000000 --- a/x/ssc/client/cli/tx.go +++ /dev/null @@ -1,36 +0,0 @@ -package cli - -import ( - "fmt" - "time" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/sagaxyz/ssc/x/ssc/types" -) - -var ( - DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) -) - -const ( - flagPacketTimeoutTimestamp = "packet-timeout-timestamp" - listSeparator = "," -) - -// GetTxCmd returns the transaction commands for this module -func GetTxCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - // this line is used by starport scaffolding # 1 - - return cmd -} diff --git a/x/ssc/genesis.go b/x/ssc/genesis.go deleted file mode 100644 index 20de790..0000000 --- a/x/ssc/genesis.go +++ /dev/null @@ -1,23 +0,0 @@ -package ssc - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/sagaxyz/ssc/x/ssc/keeper" - "github.com/sagaxyz/ssc/x/ssc/types" -) - -// InitGenesis initializes the module's state from a provided genesis state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - // this line is used by starport scaffolding # genesis/module/init - k.SetParams(ctx, genState.Params) -} - -// ExportGenesis returns the module's exported genesis -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { - genesis := types.DefaultGenesis() - genesis.Params = k.GetParams(ctx) - - // this line is used by starport scaffolding # genesis/module/export - - return genesis -} diff --git a/x/ssc/genesis_test.go b/x/ssc/genesis_test.go deleted file mode 100644 index cb4785e..0000000 --- a/x/ssc/genesis_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package ssc_test - -import ( - "testing" - - keepertest "github.com/sagaxyz/ssc/testutil/keeper" - "github.com/sagaxyz/ssc/testutil/nullify" - "github.com/sagaxyz/ssc/x/ssc" - "github.com/sagaxyz/ssc/x/ssc/types" - "github.com/stretchr/testify/require" -) - -func TestGenesis(t *testing.T) { - genesisState := types.GenesisState{ - Params: types.DefaultParams(), - - // this line is used by starport scaffolding # genesis/test/state - } - - k, ctx := keepertest.SscKeeper(t) - ssc.InitGenesis(ctx, *k, genesisState) - got := ssc.ExportGenesis(ctx, *k) - require.NotNil(t, got) - - nullify.Fill(&genesisState) - nullify.Fill(got) - - // this line is used by starport scaffolding # genesis/test/assert -} diff --git a/x/ssc/keeper/keeper.go b/x/ssc/keeper/keeper.go deleted file mode 100644 index 4ce39d3..0000000 --- a/x/ssc/keeper/keeper.go +++ /dev/null @@ -1,46 +0,0 @@ -package keeper - -import ( - "fmt" - - "github.com/cometbft/cometbft/libs/log" - "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - - "github.com/sagaxyz/ssc/x/ssc/types" -) - -type ( - Keeper struct { - cdc codec.BinaryCodec - storeKey storetypes.StoreKey - memKey storetypes.StoreKey - paramstore paramtypes.Subspace - } -) - -func NewKeeper( - cdc codec.BinaryCodec, - storeKey, - memKey storetypes.StoreKey, - ps paramtypes.Subspace, - -) *Keeper { - // set KeyTable if it has not already been set - if !ps.HasKeyTable() { - ps = ps.WithKeyTable(types.ParamKeyTable()) - } - - return &Keeper{ - cdc: cdc, - storeKey: storeKey, - memKey: memKey, - paramstore: ps, - } -} - -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} diff --git a/x/ssc/keeper/msg_server.go b/x/ssc/keeper/msg_server.go deleted file mode 100644 index 8e1aa23..0000000 --- a/x/ssc/keeper/msg_server.go +++ /dev/null @@ -1,17 +0,0 @@ -package keeper - -import ( - "github.com/sagaxyz/ssc/x/ssc/types" -) - -type msgServer struct { - Keeper -} - -// NewMsgServerImpl returns an implementation of the MsgServer interface -// for the provided Keeper. -func NewMsgServerImpl(keeper Keeper) types.MsgServer { - return &msgServer{Keeper: keeper} -} - -var _ types.MsgServer = msgServer{} diff --git a/x/ssc/keeper/msg_server_test.go b/x/ssc/keeper/msg_server_test.go deleted file mode 100644 index 3ac6150..0000000 --- a/x/ssc/keeper/msg_server_test.go +++ /dev/null @@ -1,23 +0,0 @@ -package keeper_test - -import ( - "context" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - keepertest "github.com/sagaxyz/ssc/testutil/keeper" - "github.com/sagaxyz/ssc/x/ssc/keeper" - "github.com/sagaxyz/ssc/x/ssc/types" - "github.com/stretchr/testify/require" -) - -func setupMsgServer(t testing.TB) (types.MsgServer, context.Context) { - k, ctx := keepertest.SscKeeper(t) - return keeper.NewMsgServerImpl(*k), sdk.WrapSDKContext(ctx) -} - -func TestMsgServer(t *testing.T) { - ms, ctx := setupMsgServer(t) - require.NotNil(t, ms) - require.NotNil(t, ctx) -} diff --git a/x/ssc/keeper/params.go b/x/ssc/keeper/params.go deleted file mode 100644 index 51f508c..0000000 --- a/x/ssc/keeper/params.go +++ /dev/null @@ -1,16 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/sagaxyz/ssc/x/ssc/types" -) - -// GetParams get all parameters as types.Params -func (k Keeper) GetParams(ctx sdk.Context) types.Params { - return types.NewParams() -} - -// SetParams set the params -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { - k.paramstore.SetParamSet(ctx, ¶ms) -} diff --git a/x/ssc/keeper/params_test.go b/x/ssc/keeper/params_test.go deleted file mode 100644 index e9a95df..0000000 --- a/x/ssc/keeper/params_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package keeper_test - -import ( - "testing" - - testkeeper "github.com/sagaxyz/ssc/testutil/keeper" - "github.com/sagaxyz/ssc/x/ssc/types" - "github.com/stretchr/testify/require" -) - -func TestGetParams(t *testing.T) { - k, ctx := testkeeper.SscKeeper(t) - params := types.DefaultParams() - - k.SetParams(ctx, params) - - require.EqualValues(t, params, k.GetParams(ctx)) -} diff --git a/x/ssc/keeper/query.go b/x/ssc/keeper/query.go deleted file mode 100644 index 050ff79..0000000 --- a/x/ssc/keeper/query.go +++ /dev/null @@ -1,7 +0,0 @@ -package keeper - -import ( - "github.com/sagaxyz/ssc/x/ssc/types" -) - -var _ types.QueryServer = Keeper{} diff --git a/x/ssc/keeper/query_params.go b/x/ssc/keeper/query_params.go deleted file mode 100644 index f4641ed..0000000 --- a/x/ssc/keeper/query_params.go +++ /dev/null @@ -1,19 +0,0 @@ -package keeper - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/sagaxyz/ssc/x/ssc/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(goCtx) - - return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil -} diff --git a/x/ssc/keeper/query_params_test.go b/x/ssc/keeper/query_params_test.go deleted file mode 100644 index dde3f81..0000000 --- a/x/ssc/keeper/query_params_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package keeper_test - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - testkeeper "github.com/sagaxyz/ssc/testutil/keeper" - "github.com/sagaxyz/ssc/x/ssc/types" - "github.com/stretchr/testify/require" -) - -func TestParamsQuery(t *testing.T) { - keeper, ctx := testkeeper.SscKeeper(t) - wctx := sdk.WrapSDKContext(ctx) - params := types.DefaultParams() - keeper.SetParams(ctx, params) - - response, err := keeper.Params(wctx, &types.QueryParamsRequest{}) - require.NoError(t, err) - require.Equal(t, &types.QueryParamsResponse{Params: params}, response) -} diff --git a/x/ssc/module.go b/x/ssc/module.go deleted file mode 100644 index 57ebccc..0000000 --- a/x/ssc/module.go +++ /dev/null @@ -1,148 +0,0 @@ -package ssc - -import ( - "context" - "encoding/json" - "fmt" - // this line is used by starport scaffolding # 1 - - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/sagaxyz/ssc/x/ssc/client/cli" - "github.com/sagaxyz/ssc/x/ssc/keeper" - "github.com/sagaxyz/ssc/x/ssc/types" -) - -var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} -) - -// ---------------------------------------------------------------------------- -// AppModuleBasic -// ---------------------------------------------------------------------------- - -// AppModuleBasic implements the AppModuleBasic interface that defines the independent methods a Cosmos SDK module needs to implement. -type AppModuleBasic struct { - cdc codec.BinaryCodec -} - -func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { - return AppModuleBasic{cdc: cdc} -} - -// Name returns the name of the module as a string -func (AppModuleBasic) Name() string { - return types.ModuleName -} - -// RegisterLegacyAminoCodec registers the amino codec for the module, which is used to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - types.RegisterCodec(cdc) -} - -// RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { - types.RegisterInterfaces(reg) -} - -// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. The default GenesisState need to be defined by the module developer and is primarily used for testing -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesis()) -} - -// ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { - 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) - } - return genState.Validate() -} - -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) -} - -// GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module -func (a AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.GetTxCmd() -} - -// GetQueryCmd returns the root query command for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(types.StoreKey) -} - -// ---------------------------------------------------------------------------- -// AppModule -// ---------------------------------------------------------------------------- - -// AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement -type AppModule struct { - AppModuleBasic - - keeper keeper.Keeper - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper -} - -func NewAppModule( - cdc codec.Codec, - keeper keeper.Keeper, - accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, -) AppModule { - return AppModule{ - AppModuleBasic: NewAppModuleBasic(cdc), - keeper: keeper, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - } -} - -// RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries -func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) - types.RegisterQueryServer(cfg.QueryServer(), am.keeper) -} - -// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - -// InitGenesis performs the module's genesis initialization. It returns no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { - var genState types.GenesisState - // Initialize global index to index in genesis state - cdc.MustUnmarshalJSON(gs, &genState) - - InitGenesis(ctx, am.keeper, genState) - - return []abci.ValidatorUpdate{} -} - -// ExportGenesis returns the module's exported genesis state as raw JSON bytes. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - genState := ExportGenesis(ctx, am.keeper) - return cdc.MustMarshalJSON(genState) -} - -// ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 -func (AppModule) ConsensusVersion() uint64 { return 1 } - -// BeginBlock contains the logic that is automatically triggered at the beginning of each block -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - -// EndBlock contains the logic that is automatically triggered at the end of each block -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} diff --git a/x/ssc/module_simulation.go b/x/ssc/module_simulation.go deleted file mode 100644 index 8109238..0000000 --- a/x/ssc/module_simulation.go +++ /dev/null @@ -1,64 +0,0 @@ -package ssc - -import ( - "math/rand" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" - "github.com/sagaxyz/ssc/testutil/sample" - sscsimulation "github.com/sagaxyz/ssc/x/ssc/simulation" - "github.com/sagaxyz/ssc/x/ssc/types" -) - -// avoid unused import issue -var ( - _ = sample.AccAddress - _ = sscsimulation.FindAccount - _ = simulation.MsgEntryKind - _ = baseapp.Paramspace - _ = rand.Rand{} -) - -const ( -// this line is used by starport scaffolding # simapp/module/const -) - -// GenerateGenesisState creates a randomized GenState of the module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) { - accs := make([]string, len(simState.Accounts)) - for i, acc := range simState.Accounts { - accs[i] = acc.Address.String() - } - sscGenesis := types.GenesisState{ - Params: types.DefaultParams(), - // this line is used by starport scaffolding # simapp/module/genesisState - } - simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&sscGenesis) -} - -// RegisterStoreDecoder registers a decoder. -func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} - -// ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { - return nil -} - -// WeightedOperations returns the all the gov module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { - operations := make([]simtypes.WeightedOperation, 0) - - // this line is used by starport scaffolding # simapp/module/operation - - return operations -} - -// ProposalMsgs returns msgs used for governance proposals for simulations. -func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { - return []simtypes.WeightedProposalMsg{ - // this line is used by starport scaffolding # simapp/module/OpMsg - } -} diff --git a/x/ssc/simulation/helpers.go b/x/ssc/simulation/helpers.go deleted file mode 100644 index 92c437c..0000000 --- a/x/ssc/simulation/helpers.go +++ /dev/null @@ -1,15 +0,0 @@ -package simulation - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" -) - -// FindAccount find a specific address from an account list -func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { - creator, err := sdk.AccAddressFromBech32(address) - if err != nil { - panic(err) - } - return simtypes.FindAccount(accs, creator) -} diff --git a/x/ssc/types/codec.go b/x/ssc/types/codec.go deleted file mode 100644 index 844157a..0000000 --- a/x/ssc/types/codec.go +++ /dev/null @@ -1,23 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - // this line is used by starport scaffolding # 1 - "github.com/cosmos/cosmos-sdk/types/msgservice" -) - -func RegisterCodec(cdc *codec.LegacyAmino) { - // this line is used by starport scaffolding # 2 -} - -func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { - // this line is used by starport scaffolding # 3 - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) -} - -var ( - Amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) -) diff --git a/x/ssc/types/errors.go b/x/ssc/types/errors.go deleted file mode 100644 index ac7a2bf..0000000 --- a/x/ssc/types/errors.go +++ /dev/null @@ -1,12 +0,0 @@ -package types - -// DONTCOVER - -import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -// x/ssc module sentinel errors -var ( - ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error") -) diff --git a/x/ssc/types/expected_keepers.go b/x/ssc/types/expected_keepers.go deleted file mode 100644 index 6aa6e97..0000000 --- a/x/ssc/types/expected_keepers.go +++ /dev/null @@ -1,18 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -// AccountKeeper defines the expected account keeper used for simulations (noalias) -type AccountKeeper interface { - GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI - // Methods imported from account should be defined here -} - -// BankKeeper defines the expected interface needed to retrieve account balances. -type BankKeeper interface { - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - // Methods imported from bank should be defined here -} diff --git a/x/ssc/types/genesis.go b/x/ssc/types/genesis.go deleted file mode 100644 index 0af9b44..0000000 --- a/x/ssc/types/genesis.go +++ /dev/null @@ -1,24 +0,0 @@ -package types - -import ( -// this line is used by starport scaffolding # genesis/types/import -) - -// DefaultIndex is the default global index -const DefaultIndex uint64 = 1 - -// DefaultGenesis returns the default genesis state -func DefaultGenesis() *GenesisState { - return &GenesisState{ - // this line is used by starport scaffolding # genesis/types/default - Params: DefaultParams(), - } -} - -// Validate performs basic genesis state validation returning an error upon any -// failure. -func (gs GenesisState) Validate() error { - // this line is used by starport scaffolding # genesis/types/validate - - return gs.Params.Validate() -} diff --git a/x/ssc/types/genesis.pb.go b/x/ssc/types/genesis.pb.go deleted file mode 100644 index 2ddefdb..0000000 --- a/x/ssc/types/genesis.pb.go +++ /dev/null @@ -1,320 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ssc/ssc/genesis.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the ssc module's genesis state. -type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_e4bc1b8d0ad66f74, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "ssc.ssc.GenesisState") -} - -func init() { proto.RegisterFile("ssc/ssc/genesis.proto", fileDescriptor_e4bc1b8d0ad66f74) } - -var fileDescriptor_e4bc1b8d0ad66f74 = []byte{ - // 182 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2e, 0x4e, 0xd6, - 0x07, 0xe1, 0xf4, 0xd4, 0xbc, 0xd4, 0xe2, 0xcc, 0x62, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, - 0xf6, 0xe2, 0xe2, 0x64, 0xbd, 0xe2, 0xe2, 0x64, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0xb0, 0x98, - 0x3e, 0x88, 0x05, 0x91, 0x96, 0x12, 0x81, 0xe9, 0x2a, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0x6a, 0x52, - 0xb2, 0xe5, 0xe2, 0x71, 0x87, 0x98, 0x12, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0xa4, 0xcb, 0xc5, 0x06, - 0x91, 0x97, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0xe2, 0xd7, 0x83, 0x9a, 0xaa, 0x17, 0x00, 0x16, - 0x76, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0xc8, 0xc9, 0xe6, 0xc4, 0x23, 0x39, 0xc6, - 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, - 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x94, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, - 0x73, 0xf5, 0x8b, 0x13, 0xd3, 0x13, 0x2b, 0x2a, 0xab, 0xc0, 0xb6, 0x57, 0x80, 0xc9, 0x92, 0xca, - 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0x1b, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7a, 0xae, - 0x98, 0xa5, 0xd1, 0x00, 0x00, 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ssc/types/genesis_test.go b/x/ssc/types/genesis_test.go deleted file mode 100644 index b501eac..0000000 --- a/x/ssc/types/genesis_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package types_test - -import ( - "testing" - - "github.com/sagaxyz/ssc/x/ssc/types" - "github.com/stretchr/testify/require" -) - -func TestGenesisState_Validate(t *testing.T) { - tests := []struct { - desc string - genState *types.GenesisState - valid bool - }{ - { - desc: "default is valid", - genState: types.DefaultGenesis(), - valid: true, - }, - { - desc: "valid genesis state", - genState: &types.GenesisState{ - - // this line is used by starport scaffolding # types/genesis/validField - }, - valid: true, - }, - // this line is used by starport scaffolding # types/genesis/testcase - } - for _, tc := range tests { - t.Run(tc.desc, func(t *testing.T) { - err := tc.genState.Validate() - if tc.valid { - require.NoError(t, err) - } else { - require.Error(t, err) - } - }) - } -} diff --git a/x/ssc/types/keys.go b/x/ssc/types/keys.go deleted file mode 100644 index 3a13a5c..0000000 --- a/x/ssc/types/keys.go +++ /dev/null @@ -1,19 +0,0 @@ -package types - -const ( - // ModuleName defines the module name - ModuleName = "ssc" - - // StoreKey defines the primary module store key - StoreKey = ModuleName - - // RouterKey defines the module's message routing key - RouterKey = ModuleName - - // MemStoreKey defines the in-memory store key - MemStoreKey = "mem_ssc" -) - -func KeyPrefix(p string) []byte { - return []byte(p) -} diff --git a/x/ssc/types/params.go b/x/ssc/types/params.go deleted file mode 100644 index 357196a..0000000 --- a/x/ssc/types/params.go +++ /dev/null @@ -1,39 +0,0 @@ -package types - -import ( - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "gopkg.in/yaml.v2" -) - -var _ paramtypes.ParamSet = (*Params)(nil) - -// ParamKeyTable the param key table for launch module -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - -// NewParams creates a new Params instance -func NewParams() Params { - return Params{} -} - -// DefaultParams returns a default set of parameters -func DefaultParams() Params { - return NewParams() -} - -// ParamSetPairs get the params.ParamSet -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{} -} - -// Validate validates the set of params -func (p Params) Validate() error { - return nil -} - -// String implements the Stringer interface. -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} diff --git a/x/ssc/types/params.pb.go b/x/ssc/types/params.pb.go deleted file mode 100644 index 2f64c5f..0000000 --- a/x/ssc/types/params.pb.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ssc/ssc/params.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Params defines the parameters for the module. -type Params struct { -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_2f1797d75142eff2, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Params)(nil), "ssc.ssc.Params") -} - -func init() { proto.RegisterFile("ssc/ssc/params.proto", fileDescriptor_2f1797d75142eff2) } - -var fileDescriptor_2f1797d75142eff2 = []byte{ - // 141 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x2e, 0x4e, 0xd6, - 0x07, 0xe1, 0x82, 0xc4, 0xa2, 0xc4, 0xdc, 0x62, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0xf6, - 0xe2, 0xe2, 0x64, 0xbd, 0xe2, 0xe2, 0x64, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0xb0, 0x98, 0x3e, - 0x88, 0x05, 0x91, 0x56, 0xe2, 0xe3, 0x62, 0x0b, 0x00, 0x2b, 0xb7, 0x62, 0x99, 0xb1, 0x40, 0x9e, - 0xc1, 0xc9, 0xe6, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, - 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x94, 0xd2, 0x33, - 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x8b, 0x13, 0xd3, 0x13, 0x2b, 0x2a, 0xab, - 0xc0, 0xb6, 0x55, 0x80, 0xc9, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xa1, 0xc6, 0x80, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x25, 0x74, 0xed, 0xc3, 0x8b, 0x00, 0x00, 0x00, -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ssc/types/query.pb.go b/x/ssc/types/query.pb.go deleted file mode 100644 index 4a2b23d..0000000 --- a/x/ssc/types/query.pb.go +++ /dev/null @@ -1,537 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ssc/ssc/query.proto - -package types - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_420e2ec0f14eb90d, []int{0} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params holds all the parameters of this module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_420e2ec0f14eb90d, []int{1} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "ssc.ssc.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "ssc.ssc.QueryParamsResponse") -} - -func init() { proto.RegisterFile("ssc/ssc/query.proto", fileDescriptor_420e2ec0f14eb90d) } - -var fileDescriptor_420e2ec0f14eb90d = []byte{ - // 289 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xc3, 0x30, - 0x1c, 0xc6, 0x5b, 0xd1, 0x09, 0xf1, 0x20, 0x64, 0x03, 0xb5, 0x8e, 0x4c, 0x7a, 0x12, 0xc1, 0x86, - 0xcd, 0xab, 0xa7, 0xe1, 0x03, 0xe8, 0x8e, 0xde, 0xd2, 0x1a, 0x62, 0xc1, 0xf6, 0x9f, 0xf5, 0x9f, - 0xca, 0xea, 0xd1, 0x27, 0x10, 0x7c, 0xa9, 0x1d, 0x07, 0x5e, 0x3c, 0x89, 0xb4, 0x3e, 0x88, 0x34, - 0xa9, 0x42, 0xd1, 0x43, 0x42, 0xf8, 0x7f, 0xbf, 0xef, 0xfb, 0x92, 0x90, 0x21, 0x62, 0xc2, 0xdb, - 0xb5, 0x2c, 0x65, 0x51, 0x45, 0xba, 0x00, 0x03, 0x74, 0x17, 0x31, 0x89, 0x10, 0x93, 0x60, 0xa4, - 0x40, 0x81, 0x9d, 0xf1, 0xf6, 0xe4, 0xe4, 0x60, 0xac, 0x00, 0xd4, 0x83, 0xe4, 0x42, 0xa7, 0x5c, - 0xe4, 0x39, 0x18, 0x61, 0x52, 0xc8, 0xb1, 0x53, 0xcf, 0x12, 0xc0, 0x0c, 0x90, 0xc7, 0x02, 0xa5, - 0x4b, 0xe5, 0x8f, 0xd3, 0x58, 0x1a, 0x31, 0xe5, 0x5a, 0xa8, 0x34, 0xb7, 0x70, 0xc7, 0x8e, 0x7e, - 0xda, 0xb5, 0x28, 0x44, 0xd6, 0x25, 0x84, 0x23, 0x42, 0x6f, 0x5a, 0xdf, 0xb5, 0x1d, 0x2e, 0xe4, - 0xb2, 0x94, 0x68, 0xc2, 0x2b, 0x32, 0xec, 0x4d, 0x51, 0x43, 0x8e, 0x92, 0x9e, 0x93, 0x81, 0x33, - 0x1f, 0xfa, 0x27, 0xfe, 0xe9, 0xde, 0x6c, 0x3f, 0xea, 0x2e, 0x1f, 0x39, 0x70, 0xbe, 0xbd, 0xfe, - 0x98, 0x78, 0x8b, 0x0e, 0x9a, 0x65, 0x64, 0xc7, 0xa6, 0xd0, 0x3b, 0x32, 0x70, 0x00, 0x3d, 0xfe, - 0x75, 0xfc, 0x6d, 0x0d, 0xc6, 0xff, 0x8b, 0xae, 0x3c, 0x9c, 0x3c, 0xbf, 0x7d, 0xbd, 0x6e, 0x1d, - 0xd1, 0x03, 0x8e, 0x42, 0x89, 0x55, 0xf5, 0xc4, 0xfb, 0x0f, 0x9a, 0x5f, 0xae, 0x6b, 0xe6, 0x6f, - 0x6a, 0xe6, 0x7f, 0xd6, 0xcc, 0x7f, 0x69, 0x98, 0xb7, 0x69, 0x98, 0xf7, 0xde, 0x30, 0xef, 0x36, - 0x54, 0xa9, 0xb9, 0x2f, 0xe3, 0x28, 0x81, 0xac, 0x67, 0x5e, 0xd9, 0xdd, 0x54, 0x5a, 0x62, 0x3c, - 0xb0, 0xff, 0x71, 0xf1, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xa7, 0x29, 0x62, 0x14, 0xa5, 0x01, 0x00, - 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/ssc.ssc.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ssc.ssc.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ssc.ssc.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ssc/ssc/query.proto", -} - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/ssc/types/query.pb.gw.go b/x/ssc/types/query.pb.gw.go deleted file mode 100644 index 7b13b1e..0000000 --- a/x/ssc/types/query.pb.gw.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: ssc/ssc/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 1, 2, 2}, []string{"sagaxyz", "ssc", "params"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage -) diff --git a/x/ssc/types/tx.pb.go b/x/ssc/types/tx.pb.go deleted file mode 100644 index 0a9bf61..0000000 --- a/x/ssc/types/tx.pb.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ssc/ssc/tx.proto - -package types - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func init() { proto.RegisterFile("ssc/ssc/tx.proto", fileDescriptor_48122179f5b64395) } - -var fileDescriptor_48122179f5b64395 = []byte{ - // 117 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x28, 0x2e, 0x4e, 0xd6, - 0x07, 0xe1, 0x92, 0x0a, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0xf6, 0xe2, 0xe2, 0x64, 0xbd, - 0xe2, 0xe2, 0x64, 0x23, 0x56, 0x2e, 0x66, 0xdf, 0xe2, 0x74, 0x27, 0x9b, 0x13, 0x8f, 0xe4, 0x18, - 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, - 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x4a, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, - 0xcf, 0xd5, 0x2f, 0x4e, 0x4c, 0x4f, 0xac, 0xa8, 0xac, 0x02, 0x1b, 0x55, 0x01, 0x31, 0xb0, 0xb2, - 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x6c, 0xa8, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xb4, 0x7c, - 0x69, 0x68, 0x00, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ssc.ssc.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "ssc/ssc/tx.proto", -} diff --git a/x/ssc/types/types.go b/x/ssc/types/types.go deleted file mode 100644 index ab1254f..0000000 --- a/x/ssc/types/types.go +++ /dev/null @@ -1 +0,0 @@ -package types