keeper

package
v2.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryMigrateRecord = "migrateRecord"
)

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

Types

type BankMigrate

type BankMigrate struct {
	// contains filtered or unexported fields
}

func (*BankMigrate) Execute

func (m *BankMigrate) Execute(ctx sdk.Context, _ Keeper, from sdk.AccAddress, to common.Address) error

func (*BankMigrate) Validate

func (m *BankMigrate) Validate(_ sdk.Context, _ Keeper, _ sdk.AccAddress, _ common.Address) error

type DistrStakingMigrate

type DistrStakingMigrate struct {
	// contains filtered or unexported fields
}

func (*DistrStakingMigrate) Execute

func (m *DistrStakingMigrate) Execute(ctx sdk.Context, k Keeper, from sdk.AccAddress, to common.Address) error

func (*DistrStakingMigrate) Validate

func (m *DistrStakingMigrate) Validate(ctx sdk.Context, k Keeper, from sdk.AccAddress, to common.Address) error

type GovMigrate

type GovMigrate struct {
	// contains filtered or unexported fields
}

func (*GovMigrate) Execute

func (m *GovMigrate) Execute(ctx sdk.Context, k Keeper, from sdk.AccAddress, to common.Address) error

func (*GovMigrate) Validate

func (m *GovMigrate) Validate(ctx sdk.Context, _ Keeper, from sdk.AccAddress, to common.Address) error

type Keeper

type Keeper struct {

	//account keeper
	AccountKeeper types.AccountKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, ak types.AccountKeeper) Keeper

NewKeeper generates new fee market module keeper

func (*Keeper) GetMigrateI

func (k *Keeper) GetMigrateI() []MigrateI

GetMigrateI get all migrate handlers

func (Keeper) GetMigrateRecord

func (k Keeper) GetMigrateRecord(ctx sdk.Context, addr []byte) (mr types.MigrateRecord, found bool)

GetMigrateRecord get address migrate record

func (Keeper) HasMigrateRecord

func (k Keeper) HasMigrateRecord(ctx sdk.Context, addr []byte) bool

func (Keeper) HasMigratedDirectionFrom

func (k Keeper) HasMigratedDirectionFrom(ctx sdk.Context, addr []byte) bool

func (Keeper) HasMigratedDirectionTo

func (k Keeper) HasMigratedDirectionTo(ctx sdk.Context, addr common.Address) bool

func (Keeper) IterateMigrateRecords

func (k Keeper) IterateMigrateRecords(ctx sdk.Context, cb func(types.MigrateRecord) bool)

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) MigrateAccount

func (*Keeper) SetMigrateI

func (k *Keeper) SetMigrateI(migrate ...MigrateI)

SetMigrateI set migrate handlers

func (Keeper) SetMigrateRecord

func (k Keeper) SetMigrateRecord(ctx sdk.Context, from sdk.AccAddress, to common.Address)

SetMigrateRecord set from and to migrate record

type MigrateHandler

type MigrateHandler func(ctx sdk.Context, k Keeper, from sdk.AccAddress, to common.Address) error

MigrateHandler specifies the type of function that is called when a migration is applied

type MigrateI

type MigrateI interface {
	Validate(ctx sdk.Context, k Keeper, from sdk.AccAddress, to common.Address) error
	Execute(ctx sdk.Context, k Keeper, from sdk.AccAddress, to common.Address) error
}

func NewBankMigrate

func NewBankMigrate(bk migratetypes.BankKeeper) MigrateI

func NewDistrStakingMigrate

func NewDistrStakingMigrate(distrKey, stakingKey sdk.StoreKey, stakingKeeper types.StakingKeeper) MigrateI

func NewGovMigrate

func NewGovMigrate(govKey sdk.StoreKey, govKeeper types.GovKeeper) MigrateI

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL