Skip to content

Commit

Permalink
chore: rename a to am
Browse files Browse the repository at this point in the history
  • Loading branch information
fmorency committed Jun 5, 2024
1 parent 6e9bf46 commit 32d5026
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions x/manifest/depinject.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
var _ appmodule.AppModule = AppModule{}

// IsOnePerModuleType implements the depinject.OnePerModuleType interface.
func (a AppModule) IsOnePerModuleType() {}
func (am AppModule) IsOnePerModuleType() {}

// IsAppModule implements the appmodule.AppModule interface.
func (a AppModule) IsAppModule() {}
func (am AppModule) IsAppModule() {}

func init() {
appmodule.Register(
Expand Down
22 changes: 11 additions & 11 deletions x/manifest/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
//
//nolint:stylecheck
func (a AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Query: &autocliv1.ServiceCommandDescriptor{
Service: manifestv1.Query_ServiceDesc.ServiceName,
Expand Down Expand Up @@ -132,38 +132,38 @@ func (a AppModuleBasic) RegisterInterfaces(r codectypes.InterfaceRegistry) {
types.RegisterInterfaces(r)
}

func (a AppModule) InitGenesis(ctx sdk.Context, marshaler codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate {
func (am AppModule) InitGenesis(ctx sdk.Context, marshaler codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate {
var genesisState types.GenesisState
marshaler.MustUnmarshalJSON(message, &genesisState)

if err := a.keeper.Params.Set(ctx, genesisState.Params); err != nil {
if err := am.keeper.Params.Set(ctx, genesisState.Params); err != nil {
panic(err)
}

return nil
}

func (a AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) json.RawMessage {
genState := a.keeper.ExportGenesis(ctx)
func (am AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) json.RawMessage {
genState := am.keeper.ExportGenesis(ctx)

Check warning on line 147 in x/manifest/module.go

View check run for this annotation

Codecov / codecov/patch

x/manifest/module.go#L146-L147

Added lines #L146 - L147 were not covered by tests
return marshaler.MustMarshalJSON(genState)
}

func (a AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {
}

func (a AppModule) QuerierRoute() string {
func (am AppModule) QuerierRoute() string {

Check warning on line 154 in x/manifest/module.go

View check run for this annotation

Codecov / codecov/patch

x/manifest/module.go#L154

Added line #L154 was not covered by tests
return types.QuerierRoute
}

func (a AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(a.keeper))
types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(a.keeper))
func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper))
types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(am.keeper))
}

// 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 (a AppModule) ConsensusVersion() uint64 {
func (am AppModule) ConsensusVersion() uint64 {
return ConsensusVersion
}

0 comments on commit 32d5026

Please sign in to comment.