Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Hooks
- func (h Hooks) AfterProposalDeposit(_ sdk.Context, _ uint64, _ sdk.AccAddress)
- func (h Hooks) AfterProposalFailedMinDeposit(_ sdk.Context, _ uint64)
- func (h Hooks) AfterProposalSubmission(_ sdk.Context, _ uint64)
- func (h Hooks) AfterProposalVote(_ sdk.Context, _ uint64, _ sdk.AccAddress)
- func (h Hooks) AfterProposalVotingPeriodEnded(_ sdk.Context, _ uint64)
- func (h Hooks) GetOtherVotes(ctx sdk.Context, votes *govtypes.Votes, otherVotes *govtypes.OtherVotes)
- type Keeper
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetActiveLiquidValidators(ctx sdk.Context) (vals []types.LiquidValidator, totalWeight sdk.Dec)
- func (k Keeper) GetAllLiquidValidators(ctx sdk.Context) (vals []types.LiquidValidator)
- func (k Keeper) GetAllLiquidValidatorsMap(ctx sdk.Context) map[string]types.LiquidValidator
- func (k Keeper) GetCodec() codec.BinaryCodec
- func (k Keeper) GetLiquidValidator(ctx sdk.Context, addr sdk.ValAddress) (val types.LiquidValidator, found bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) LiquidBondDenom(ctx sdk.Context) (res string)
- func (k Keeper) LiquidStaking(ctx sdk.Context, proxyAcc, liquidStaker sdk.AccAddress, stakingCoin sdk.Coin) (newShares sdk.Dec, err error)
- func (k Keeper) LiquidUnbond(ctx sdk.Context, proxyAcc, liquidStaker sdk.AccAddress, valAddr sdk.ValAddress, ...) (time.Time, stakingtypes.UnbondingDelegation, error)
- func (k Keeper) LiquidUnstaking(ctx sdk.Context, proxyAcc, liquidStaker sdk.AccAddress, amount sdk.Coin) (time.Time, []stakingtypes.UnbondingDelegation, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) NetAmount(ctx sdk.Context) sdk.Dec
- func (k Keeper) Rebalancing(ctx sdk.Context, moduleAcc sdk.AccAddress, activeVals types.LiquidValidators, ...) (rebalancedLiquidVals types.LiquidValidators)
- func (k Keeper) SetLiquidValidator(ctx sdk.Context, val types.LiquidValidator)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) UpdateLiquidValidators(ctx sdk.Context)
- type Querier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the liquidstaking MsgServer interface for the provided Keeper.
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Wrapper struct
func (Hooks) AfterProposalDeposit ¶
func (Hooks) AfterProposalFailedMinDeposit ¶
func (Hooks) AfterProposalSubmission ¶
func (Hooks) AfterProposalVote ¶
func (Hooks) AfterProposalVotingPeriodEnded ¶
func (Hooks) GetOtherVotes ¶
func (h Hooks) GetOtherVotes(ctx sdk.Context, votes *govtypes.Votes, otherVotes *govtypes.OtherVotes)
GetOtherVotes calculate the voting power of the person who participated in liquid staking.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the liquidstaking store
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper, distrKeeper types.Distrkeeper, govKeeper types.GovKeeper, ) Keeper
NewKeeper returns a liquidstaking keeper. It handles: - creating new ModuleAccounts for each pool ReserveAccount - sending to and from ModuleAccounts - minting, burning PoolCoins
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the liquidstaking module's genesis state.
func (Keeper) GetActiveLiquidValidators ¶
func (k Keeper) GetActiveLiquidValidators(ctx sdk.Context) (vals []types.LiquidValidator, totalWeight sdk.Dec)
GetActiveLiquidValidators get the set of active liquid validators.
func (Keeper) GetAllLiquidValidators ¶
func (k Keeper) GetAllLiquidValidators(ctx sdk.Context) (vals []types.LiquidValidator)
GetAllLiquidValidators get the set of all liquid validators with no limits, used during genesis dump
func (Keeper) GetAllLiquidValidatorsMap ¶
GetAllLiquidValidatorsMap get the set of all liquid validators as map with no limits
func (Keeper) GetCodec ¶
func (k Keeper) GetCodec() codec.BinaryCodec
GetCodec return codec.Codec object used by the keeper
func (Keeper) GetLiquidValidator ¶
func (k Keeper) GetLiquidValidator(ctx sdk.Context, addr sdk.ValAddress) (val types.LiquidValidator, found bool)
GetLiquidValidator get a single liquid validator
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the liquidstaking module's state from a given genesis state.
func (Keeper) LiquidStaking ¶
func (k Keeper) LiquidStaking( ctx sdk.Context, proxyAcc, liquidStaker sdk.AccAddress, stakingCoin sdk.Coin) (newShares sdk.Dec, err error)
LiquidStaking ...
func (Keeper) LiquidUnbond ¶
func (k Keeper) LiquidUnbond( ctx sdk.Context, proxyAcc, liquidStaker sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount sdk.Dec, ) (time.Time, stakingtypes.UnbondingDelegation, error)
LiquidUnbond ...
func (Keeper) LiquidUnstaking ¶
func (k Keeper) LiquidUnstaking( ctx sdk.Context, proxyAcc, liquidStaker sdk.AccAddress, amount sdk.Coin, ) (time.Time, []stakingtypes.UnbondingDelegation, error)
LiquidUnstaking ...
func (Keeper) Rebalancing ¶
func (k Keeper) Rebalancing(ctx sdk.Context, moduleAcc sdk.AccAddress, activeVals types.LiquidValidators, threshold sdk.Dec) (rebalancedLiquidVals types.LiquidValidators)
activeVals containing ValidatorStatusActive which is containing just added on whitelist(power 0) and ValidatorStatusDelisting
func (Keeper) SetLiquidValidator ¶
func (k Keeper) SetLiquidValidator(ctx sdk.Context, val types.LiquidValidator)
SetLiquidValidator set the main record holding liquid validator details
func (Keeper) UpdateLiquidValidators ¶
type Querier ¶
type Querier struct {
Keeper
}
Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper.
func (Querier) LiquidValidators ¶
func (k Querier) LiquidValidators(c context.Context, req *types.QueryLiquidValidatorsRequest) (*types.QueryLiquidValidatorsResponse, error)
LiquidValidators queries all liquid validators.
func (Querier) Params ¶
func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries the parameters of the liquidstaking module.