Documentation ¶
Index ¶
- Constants
- Variables
- func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte
- func GetDelegationsByValKey(valAddr sdk.ValAddress, delAddr sdk.AccAddress) []byte
- func GetDelegationsByValPrefixKey(valAddr sdk.ValAddress) []byte
- func GetDelegationsKey(delAddr sdk.AccAddress) []byte
- func GetHistoricalInfoKey(height int64) []byte
- func GetLegacyHistoricalInfoKey(height int64) []byte
- func MigrateStore(ctx context.Context, store storetypes.KVStore, cdc codec.BinaryCodec, ...) error
- func ParseDelegationKey(bz []byte) (sdk.AccAddress, sdk.ValAddress, error)
- func ParseDelegationsByValKey(bz []byte) (sdk.ValAddress, sdk.AccAddress, error)
Constants ¶
const (
// ModuleName is the name of the module
ModuleName = "staking"
)
Variables ¶
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 ¶
GetHistoricalInfoKey returns a key prefix for indexing HistoricalInfo objects.
func GetLegacyHistoricalInfoKey ¶
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.