Documentation ¶
Overview ¶
Package v040 is copy-pasted from: https://github.com/DFWallet/cosmos/blob/v0.41.0/x/bank/types/key.go
Index ¶
- Constants
- Variables
- func AddressFromBalancesStore(key []byte) sdk.AccAddress
- func DenomMetadataKey(denom string) []byte
- func Migrate(bankGenState v038bank.GenesisState, authGenState v039auth.GenesisState, ...) *types.GenesisState
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- type SupplyI
Constants ¶
const ( // ModuleName defines the module name ModuleName = "bank" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey defines the module's message routing key RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName )
Variables ¶
var ( BalancesPrefix = []byte("balances") SupplyKey = []byte{0x00} DenomMetadataPrefix = []byte{0x1} )
KVStore keys
Functions ¶
func AddressFromBalancesStore ¶
func AddressFromBalancesStore(key []byte) sdk.AccAddress
AddressFromBalancesStore returns an account address from a balances prefix store. The key must not contain the perfix BalancesPrefix as the prefix store iterator discards the actual prefix.
func DenomMetadataKey ¶
DenomMetadataKey returns the denomination metadata key.
func Migrate ¶
func Migrate( bankGenState v038bank.GenesisState, authGenState v039auth.GenesisState, supplyGenState v036supply.GenesisState, ) *types.GenesisState
Migrate accepts exported v0.39 x/auth and v0.38 x/bank genesis state and migrates it to v0.40 x/bank genesis state. The migration includes:
- Moving balances from x/auth to x/bank genesis state. - Moving supply from x/supply to x/bank genesis state. - Re-encode in v0.40 GenesisState.
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers interfaces required for the v0.40 migrations.
Types ¶
type SupplyI ¶
SupplyI defines an inflationary supply interface for modules that handle token supply. It is copy-pasted from: https://github.com/DFWallet/cosmos/blob/v042.3/x/bank/exported/exported.go where we stripped off the unnecessary methods.
It is used in the migration script, because we save this interface as an Any in the supply state.
Deprecated.