v043

package
v0.48.0-ramus1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v043 creates in-place store migrations for fixing tracking delegations with vesting accounts. ref: https://github.com/cosmos/cosmos-sdk/issues/8601 ref: https://github.com/cosmos/cosmos-sdk/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/cosmos/cosmos-sdk/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/cosmos/cosmos-sdk/issues/8601, https://github.com/cosmos/cosmos-sdk/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.

Jump to

Keyboard shortcuts

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