v2

package
v0.50.6 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 6

Documentation

Index

Constants

View Source
const (
	ModuleName = "bank"
)

Variables

View Source
var (
	SupplyKey           = []byte{0x00}
	BalancesPrefix      = []byte{0x02}
	DenomMetadataPrefix = []byte{0x1}

	ErrInvalidKey = errors.New("invalid key")
)

Functions

func AddressFromBalancesStore

func AddressFromBalancesStore(key []byte) (sdk.AccAddress, error)

func CreateAccountBalancesPrefix

func CreateAccountBalancesPrefix(addr []byte) []byte

func CreatePrefixedAccountStoreKey added in v0.50.1

func CreatePrefixedAccountStoreKey(addr, denom []byte) []byte

CreatePrefixedAccountStoreKey returns the key for the given account and denomination. This method can be used when performing an ABCI query for the balance of an account.

func DenomMetadataKey

func DenomMetadataKey(denom string) []byte

DenomMetadataKey returns the denomination metadata key.

func MigrateJSON

func MigrateJSON(oldState *types.GenesisState) *types.GenesisState

MigrateJSON accepts exported v0.40 x/bank genesis state and migrates it to v0.43 x/bank genesis state. The migration includes: - Prune balances & supply with zero coins (ref: https://github.com/cosmos/cosmos-sdk/pull/9229)

func MigrateStore

func MigrateStore(ctx sdk.Context, storeService store.KVStoreService, cdc codec.BinaryCodec) error

MigrateStore performs in-place store migrations from v0.40 to v0.43. The migration includes:

- Change addresses to be length-prefixed. - Change balances prefix to 1 byte - Change supply to be indexed by denom - Prune balances & supply with zero coins (ref: https://github.com/cosmos/cosmos-sdk/pull/9229)

Types

This section is empty.

Jump to

Keyboard shortcuts

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