Skip to content

Commit

Permalink
feat: add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
hallazzang committed Jun 16, 2022
1 parent 6c64809 commit 3100d40
Show file tree
Hide file tree
Showing 5 changed files with 3,458 additions and 1 deletion.
19 changes: 19 additions & 0 deletions x/liquidity/keeper/migrations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package keeper

import (
sdk "github.com/cosmos/cosmos-sdk/types"

v2 "github.com/cosmosquad-labs/squad/x/liquidity/legacy/v2"
)

type Migrator struct {
keeper Keeper
}

func NewMigrator(keeper Keeper) Migrator {
return Migrator{keeper: keeper}
}

func (m Migrator) Migrate1to2(ctx sdk.Context) error {
return v2.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc)
}
Loading

0 comments on commit 3100d40

Please sign in to comment.