Skip to content

Commit

Permalink
style: remove migrator for module (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir-code authored Mar 8, 2024
1 parent 5e0310c commit c263e1a
Show file tree
Hide file tree
Showing 17 changed files with 5 additions and 584 deletions.
7 changes: 1 addition & 6 deletions x/avalanche/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,7 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier {
}

// RegisterServices registers module services.
func (am AppModule) RegisterServices(cfg module.Configurator) {
migrator := crosschainkeeper.NewMigrator(am.keeper, am.legacySubspace)
if err := cfg.RegisterMigration(am.Name(), 1, migrator.Migrate3to4); err != nil {
panic(err)
}
}
func (am AppModule) RegisterServices(cfg module.Configurator) {}

// InitGenesis initializes the genesis state for this module and implements app module.
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate {
Expand Down
7 changes: 1 addition & 6 deletions x/bsc/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,7 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier {
}

// RegisterServices registers module services.
func (am AppModule) RegisterServices(cfg module.Configurator) {
migrator := crosschainkeeper.NewMigrator(am.keeper, am.legacySubspace)
if err := cfg.RegisterMigration(am.Name(), 3, migrator.Migrate3to4); err != nil {
panic(err)
}
}
func (am AppModule) RegisterServices(cfg module.Configurator) {}

// InitGenesis initializes the genesis state for this module and implements app module.
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate {
Expand Down
32 changes: 0 additions & 32 deletions x/crosschain/keeper/migrations.go

This file was deleted.

23 changes: 0 additions & 23 deletions x/crosschain/migrations/v4/migrator_param.go

This file was deleted.

74 changes: 0 additions & 74 deletions x/crosschain/migrations/v4/migrator_param_test.go

This file was deleted.

33 changes: 0 additions & 33 deletions x/erc20/keeper/migrations.go

This file was deleted.

23 changes: 0 additions & 23 deletions x/erc20/migrations/v4/migrator_param.go

This file was deleted.

73 changes: 0 additions & 73 deletions x/erc20/migrations/v4/migrator_param_test.go

This file was deleted.

5 changes: 0 additions & 5 deletions x/erc20/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier {
func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterMsgServer(cfg.MsgServer(), am.keeper)
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)

migrator := keeper.NewMigrator(am.keeper, am.legacySubspace)
if err := cfg.RegisterMigration(types.ModuleName, 2, migrator.Migrate3to4); err != nil {
panic(err)
}
}

// InitGenesis performs the capability module's genesis initialization It returns
Expand Down
7 changes: 1 addition & 6 deletions x/eth/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,7 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier {
}

// RegisterServices registers module services.
func (am AppModule) RegisterServices(cfg module.Configurator) {
migrator := crosschainkeeper.NewMigrator(am.keeper, am.legacySubspace)
if err := cfg.RegisterMigration(am.Name(), 1, migrator.Migrate3to4); err != nil {
panic(err)
}
}
func (am AppModule) RegisterServices(cfg module.Configurator) {}

// InitGenesis initializes the genesis state for this module and implements app module.
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate {
Expand Down
30 changes: 0 additions & 30 deletions x/gov/keeper/migrations.go

This file was deleted.

Loading

0 comments on commit c263e1a

Please sign in to comment.