chore: module assertions for x/auction (#191)
* add assertions * modify signature
This commit is contained in:
parent
db685372dc
commit
a9540dac92
@ -8,7 +8,6 @@ import (
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/depinject"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
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"
|
||||
@ -27,8 +26,12 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
_ module.AppModule = AppModule{}
|
||||
_ module.AppModuleBasic = AppModuleBasic{}
|
||||
_ module.AppModuleBasic = AppModule{}
|
||||
_ module.HasGenesis = AppModule{}
|
||||
_ module.HasServices = AppModule{}
|
||||
_ module.HasInvariants = AppModule{}
|
||||
|
||||
_ appmodule.AppModule = AppModule{}
|
||||
)
|
||||
|
||||
// ConsensusVersion defines the current x/auction module consensus version.
|
||||
@ -127,12 +130,11 @@ func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}
|
||||
|
||||
// InitGenesis performs the module's genesis initialization for the auction
|
||||
// module. It returns no validator updates.
|
||||
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate {
|
||||
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) {
|
||||
var genState types.GenesisState
|
||||
cdc.MustUnmarshalJSON(gs, &genState)
|
||||
|
||||
am.keeper.InitGenesis(ctx, genState)
|
||||
return []abci.ValidatorUpdate{}
|
||||
}
|
||||
|
||||
// ExportGenesis returns the auction module's exported genesis state as raw
|
||||
|
||||
Loading…
Reference in New Issue
Block a user