Documentation
¶
Index ¶
- type AccountKeeper
- func (k AccountKeeper) AccountsBetween(ctx sdk.Context, start, end sdk.AccAddress) []types.BaseAccount
- func (k AccountKeeper) AllAccounts(ctx sdk.Context) []types.BaseAccount
- func (k AccountKeeper) AllAddresses(ctx sdk.Context) []sdk.AccAddress
- func (k AccountKeeper) CreateAccount(ctx sdk.Context, pubKey crypto.PubKey)
- func (k AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) (types.BaseAccount, error)
- type StakingKeeper
- func (k StakingKeeper) CreateDelegation(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress)
- func (k StakingKeeper) GetDelegation(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress) (types.Delegation, error)
- func (k StakingKeeper) GetValidatorDelegations(ctx sdk.Context, val sdk.ValAddress) []types.Delegation
- func (k StakingKeeper) GetValidatorDelegationsBetween(ctx sdk.Context, val sdk.ValAddress, start sdk.AccAddress, end sdk.AccAddress) []types.Delegation
- type StakingKeeper2
- type ValidatorIndexes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountKeeper ¶
type AccountKeeper struct {
AccountNumber collections.Sequence
Accounts collections.Map[sdk.AccAddress, types.BaseAccount]
Params collections.Item[types.Params]
}
func NewAccountKeeper ¶
func NewAccountKeeper(sk storagetypes.StoreKey, cdc codec.BinaryCodec) *AccountKeeper
func (AccountKeeper) AccountsBetween ¶
func (k AccountKeeper) AccountsBetween(ctx sdk.Context, start, end sdk.AccAddress) []types.BaseAccount
func (AccountKeeper) AllAccounts ¶
func (k AccountKeeper) AllAccounts(ctx sdk.Context) []types.BaseAccount
func (AccountKeeper) AllAddresses ¶
func (k AccountKeeper) AllAddresses(ctx sdk.Context) []sdk.AccAddress
func (AccountKeeper) CreateAccount ¶
func (k AccountKeeper) CreateAccount(ctx sdk.Context, pubKey crypto.PubKey)
func (AccountKeeper) GetAccount ¶
func (k AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) (types.BaseAccount, error)
type StakingKeeper ¶
type StakingKeeper struct {
Delegations collections.Map[collections.Pair[sdk.ValAddress, sdk.AccAddress], types.Delegation]
}
func NewStakingKeeper ¶
func NewStakingKeeper(sk storagetypes.StoreKey, cdc codec.BinaryCodec) *StakingKeeper
func (StakingKeeper) CreateDelegation ¶
func (k StakingKeeper) CreateDelegation(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress)
func (StakingKeeper) GetDelegation ¶
func (k StakingKeeper) GetDelegation(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress) (types.Delegation, error)
func (StakingKeeper) GetValidatorDelegations ¶
func (k StakingKeeper) GetValidatorDelegations(ctx sdk.Context, val sdk.ValAddress) []types.Delegation
func (StakingKeeper) GetValidatorDelegationsBetween ¶
func (k StakingKeeper) GetValidatorDelegationsBetween(ctx sdk.Context, val sdk.ValAddress, start sdk.AccAddress, end sdk.AccAddress) []types.Delegation
type StakingKeeper2 ¶
type StakingKeeper2 struct {
Validators collections.IndexedMap[sdk.ValAddress, types.Validator, ValidatorIndexes]
}
func NewStakingKeeper2 ¶
func NewStakingKeeper2(sk storagetypes.StoreKey, cdc codec.BinaryCodec) *StakingKeeper2
func (StakingKeeper2) CreateValidator ¶
func (k StakingKeeper2) CreateValidator(ctx sdk.Context, val types.Validator)
func (StakingKeeper2) GetValidatorsByConsAddress ¶
func (k StakingKeeper2) GetValidatorsByConsAddress(ctx sdk.Context, consAddr sdk.ConsAddress) []types.Validator
type ValidatorIndexes ¶
type ValidatorIndexes struct {
// ConsensusAddress defines an Index of the validator structure which allows us
// to get validators by their ConsensusAddress.
ConsensusAddress collections.MultiIndex[sdk.ConsAddress, sdk.ValAddress, types.Validator]
}
ValidatorIndexes defines the indexes for the Validator IndexedMap. This structure just defines and groups together the indexes associated with a value of the IndexedMap.
func (ValidatorIndexes) IndexerList ¶
func (v ValidatorIndexes) IndexerList() []collections.Indexer[sdk.ValAddress, types.Validator]
IndexerList implements the collections.IndexersProvider interface. It consists on simply returning the list of the indexes (we have only one ConsensusAddress)
Click to show internal directories.
Click to hide internal directories.