Skip to content

Commit

Permalink
update modules and export, remove commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb committed Feb 21, 2024
1 parent 40e9729 commit 26cca72
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 639 deletions.
4 changes: 2 additions & 2 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"log"

tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"

servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -35,7 +35,7 @@ func (app *NoisApp) ExportAppStateAndValidators(
return servertypes.ExportedApp{}, err
}

validators, err := staking.WriteValidators(ctx, app.StakingKeeper)
validators, err := staking.WriteValidators(ctx, &app.StakingKeeper)
return servertypes.ExportedApp{
AppState: appState,
Validators: validators,
Expand Down
39 changes: 21 additions & 18 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package app

import (
"github.com/CosmWasm/wasmd/x/wasm"
wasmclient "github.com/CosmWasm/wasmd/x/wasm/client"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/auth"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
Expand All @@ -12,13 +11,14 @@ import (
"github.com/cosmos/cosmos-sdk/x/capability"
"github.com/cosmos/cosmos-sdk/x/crisis"
distr "github.com/cosmos/cosmos-sdk/x/distribution"
distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
"github.com/cosmos/cosmos-sdk/x/evidence"
feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module"
"github.com/cosmos/cosmos-sdk/x/genutil"

wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cosmos/cosmos-sdk/x/gov"
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"github.com/cosmos/cosmos-sdk/x/mint"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
Expand All @@ -29,14 +29,27 @@ import (
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"
transfer "github.com/cosmos/ibc-go/v4/modules/apps/transfer"
ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v4/modules/core"
ibcclientclient "github.com/cosmos/ibc-go/v4/modules/core/02-client/client"
transfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer"
ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v7/modules/core"
ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client"
allocation "github.com/noislabs/noisd/x/allocation"
allocationtypes "github.com/noislabs/noisd/x/allocation/types"
)

func getGovProposalHandlers() []govclient.ProposalHandler {
govProposalHandlers := make([]govclient.ProposalHandler, 0)

govProposalHandlers = append(govProposalHandlers,
paramsclient.ProposalHandler,
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
)
return govProposalHandlers
}

var (
ModuleBasics = module.NewBasicManager(
auth.AppModuleBasic{},
Expand All @@ -46,17 +59,7 @@ var (
staking.AppModuleBasic{},
mint.AppModuleBasic{},
distr.AppModuleBasic{},
gov.NewAppModuleBasic(
append(
wasmclient.ProposalHandlers, //nolint:staticcheck
paramsclient.ProposalHandler,
distrclient.ProposalHandler,
upgradeclient.ProposalHandler,
upgradeclient.CancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
)...,
),
gov.NewAppModuleBasic(getGovProposalHandlers()),
params.AppModuleBasic{},
crisis.AppModuleBasic{},
slashing.AppModuleBasic{},
Expand All @@ -79,7 +82,7 @@ var (
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
wasm.ModuleName: {authtypes.Burner},
wasmtypes.ModuleName: {authtypes.Burner},
allocationtypes.ModuleName: nil,
allocationtypes.ValidatorRewardsPool: nil,
}
Expand Down
192 changes: 0 additions & 192 deletions cmd/noisd/genaccounts.go

This file was deleted.

Loading

0 comments on commit 26cca72

Please sign in to comment.