v5

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "staking"
)

Variables

View Source
var (
	DelegationKey           = []byte{0x31} // key for a delegation
	HistoricalInfoKey       = []byte{0x50} // prefix for the historical info
	DelegationByValIndexKey = []byte{0x71} // key for delegations by a validator

)

Functions

func GetDelegationKey

func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte

GetDelegationKey creates the key for delegator bond with validator VALUE: staking/Delegation

func GetDelegationsByValKey

func GetDelegationsByValKey(valAddr sdk.ValAddress, delAddr sdk.AccAddress) []byte

GetDelegationsByValKey creates the key for delegations by validator address VALUE: staking/Delegation

func GetDelegationsByValPrefixKey

func GetDelegationsByValPrefixKey(valAddr sdk.ValAddress) []byte

GetDelegationsByValPrefixKey builds a prefix key bytes with the given validator address bytes.

func GetDelegationsKey

func GetDelegationsKey(delAddr sdk.AccAddress) []byte

GetDelegationsKey creates the prefix for a delegator for all validators

func GetHistoricalInfoKey

func GetHistoricalInfoKey(height int64) []byte

GetHistoricalInfoKey returns a key prefix for indexing HistoricalInfo objects.

func GetLegacyHistoricalInfoKey

func GetLegacyHistoricalInfoKey(height int64) []byte

GetHistoricalInfoKey returns a key prefix for indexing HistoricalInfo objects.

func MigrateStore

func MigrateStore(ctx context.Context, store storetypes.KVStore, cdc codec.BinaryCodec, logger log.Logger) error

MigrateStore performs in-place store migrations from v4 to v5.

func ParseDelegationKey

func ParseDelegationKey(bz []byte) (sdk.AccAddress, sdk.ValAddress, error)

ParseDelegationKey parses given key and returns delagator, validator address bytes

func ParseDelegationsByValKey

func ParseDelegationsByValKey(bz []byte) (sdk.ValAddress, sdk.AccAddress, error)

ParseDelegationsByValKey parses given key and returns validator, delegator address bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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