Documentation ¶
Overview ¶
Package v043 creates in-place store migrations for fixing tracking delegations with vesting accounts. ref: https://github.com/DFWallet/cosmos/issues/8601 ref: https://github.com/DFWallet/cosmos/issues/8812
The migration script modifies x/auth state, hence lives in the `x/auth/legacy` folder. However, it needs access to staking and bank state. To avoid cyclic dependencies, we cannot import those 2 keepers in this file. To solve this, we use the baseapp router to do inter-module querying, by importing the `baseapp.QueryRouter grpc.Server`. This is really hacky.
PLEASE DO NOT REPLICATE THIS PATTERN IN YOUR OWN APP.
Proposals to refactor this file have been made in: https://github.com/DFWallet/cosmos/issues/9070 The preferred solution is to use inter-module communication (ADR-033), and this file will be refactored to use ADR-033 once it's ready.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateAccount ¶
func MigrateAccount(ctx sdk.Context, account types.AccountI, queryServer grpc.Server) (types.AccountI, error)
MigrateAccount migrates vesting account to make the DelegatedVesting and DelegatedFree fields correctly track delegations. References: https://github.com/DFWallet/cosmos/issues/8601, https://github.com/DFWallet/cosmos/issues/8812
We use the baseapp.QueryRouter here to do inter-module state querying. PLEASE DO NOT REPLICATE THIS PATTERN IN YOUR OWN APP.
Types ¶
This section is empty.