Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Hooks
- func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress)
- func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress)
- func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress)
- func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress)
- func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec)
- type Keeper
- func (k Keeper) AddDelegatorAddressToWhitelist(ctx sdk.Context, delegatorAddress sdk.AccAddress)
- func (k Keeper) AddValAddressToWhitelist(ctx sdk.Context, valAddress sdk.ValAddress)
- func (k Keeper) BondedRatio(ctx sdk.Context) sdk.Dec
- func (k Keeper) DelegatorWhitelist(goCtx context.Context, req *types.QueryDelegatorWhitelistRequest) (*types.QueryDelegatorWhitelistResponse, error)
- func (k Keeper) DelegatorWhitelistSwitch(goCtx context.Context, req *types.QueryDelegatorWhitelistSwitchRequest) (*types.QueryDelegatorWhitelistSwitchResponse, error)
- func (k Keeper) GetBankKeeper() types.BankKeeper
- func (k Keeper) GetDelegatorAddressWhitelist(ctx sdk.Context) []string
- func (k Keeper) GetDelegatorWhitelistSwitch(ctx sdk.Context) bool
- func (k Keeper) GetFeeCollectorName() string
- func (k Keeper) GetInflationBase(ctx sdk.Context) (sdk.Int, bool)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetValAddressWhitelist(ctx sdk.Context) []string
- func (k Keeper) GetValidatorWhitelistSwitch(ctx sdk.Context) bool
- func (k Keeper) HasDelegatorAddressInWhitelist(ctx sdk.Context, delegatorAddress sdk.AccAddress) bool
- func (k Keeper) HasValAddressInWhitelist(ctx sdk.Context, valAddress sdk.ValAddress) bool
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InflationBase(goCtx context.Context, req *types.QueryInflationBaseRequest) (*types.QueryInflationBaseResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintCoins(ctx sdk.Context, newCoins sdk.Coins) error
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RemoveDelegatorAddressFromWhitelist(ctx sdk.Context, delegatorAddress sdk.AccAddress)
- func (k Keeper) SetDelegatorWhitelistSwitch(ctx sdk.Context, isOpen bool)
- func (k Keeper) SetInflationBase(ctx sdk.Context, inflationBase sdk.Int)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetValidatorWhitelistSwitch(ctx sdk.Context, isOpen bool)
- func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdk.Int
- func (k Keeper) ToggleDelegatorWhitelistSwitch(ctx sdk.Context)
- func (k Keeper) ToggleValidatorWhitelistSwitch(ctx sdk.Context)
- func (k Keeper) ValidatorWhitelist(goCtx context.Context, req *types.QueryValidatorWhitelistRequest) (*types.QueryValidatorWhitelistResponse, error)
- func (k Keeper) ValidatorWhitelistSwitch(goCtx context.Context, req *types.QueryValidatorWhitelistSwitchRequest) (*types.QueryValidatorWhitelistSwitchResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Wrapper struct
func (Hooks) AfterDelegationModified ¶
func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
create new delegation period record
func (Hooks) AfterValidatorBeginUnbonding ¶
func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress)
func (Hooks) AfterValidatorBonded ¶
func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress)
func (Hooks) AfterValidatorCreated ¶
func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)
initialize validator distribution record
func (Hooks) AfterValidatorRemoved ¶
func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
AfterValidatorRemoved performs clean up after a validator is removed
func (Hooks) BeforeDelegationCreated ¶
func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
increment period
func (Hooks) BeforeDelegationRemoved ¶
func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress)
func (Hooks) BeforeDelegationSharesModified ¶
func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
withdraw delegation rewards (which also increments period)
func (Hooks) BeforeValidatorModified ¶
func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress)
func (Hooks) BeforeValidatorSlashed ¶
record the slash event
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, sudoKeeper types.SudoKeeper, feeCollectorName string, ) *Keeper
func (Keeper) AddDelegatorAddressToWhitelist ¶
func (k Keeper) AddDelegatorAddressToWhitelist(ctx sdk.Context, delegatorAddress sdk.AccAddress)
func (Keeper) AddValAddressToWhitelist ¶
func (k Keeper) AddValAddressToWhitelist(ctx sdk.Context, valAddress sdk.ValAddress)
func (Keeper) BondedRatio ¶
impl for mint keeper
func (Keeper) DelegatorWhitelist ¶
func (k Keeper) DelegatorWhitelist(goCtx context.Context, req *types.QueryDelegatorWhitelistRequest) (*types.QueryDelegatorWhitelistResponse, error)
func (Keeper) DelegatorWhitelistSwitch ¶
func (k Keeper) DelegatorWhitelistSwitch(goCtx context.Context, req *types.QueryDelegatorWhitelistSwitchRequest) (*types.QueryDelegatorWhitelistSwitchResponse, error)
func (Keeper) GetBankKeeper ¶
func (k Keeper) GetBankKeeper() types.BankKeeper
func (Keeper) GetDelegatorAddressWhitelist ¶
func (Keeper) GetDelegatorWhitelistSwitch ¶
func (Keeper) GetFeeCollectorName ¶
func (Keeper) GetValAddressWhitelist ¶
func (Keeper) GetValidatorWhitelistSwitch ¶
func (Keeper) HasDelegatorAddressInWhitelist ¶
func (Keeper) HasValAddressInWhitelist ¶
func (Keeper) InflationBase ¶
func (k Keeper) InflationBase(goCtx context.Context, req *types.QueryInflationBaseRequest) (*types.QueryInflationBaseResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RemoveDelegatorAddressFromWhitelist ¶ added in v0.2.1
func (k Keeper) RemoveDelegatorAddressFromWhitelist(ctx sdk.Context, delegatorAddress sdk.AccAddress)
func (Keeper) SetDelegatorWhitelistSwitch ¶
func (Keeper) SetInflationBase ¶
func (Keeper) SetValidatorWhitelistSwitch ¶
func (Keeper) StakingTokenSupply ¶
impl for mint keeper
func (Keeper) ToggleDelegatorWhitelistSwitch ¶
func (Keeper) ToggleValidatorWhitelistSwitch ¶
func (Keeper) ValidatorWhitelist ¶
func (k Keeper) ValidatorWhitelist(goCtx context.Context, req *types.QueryValidatorWhitelistRequest) (*types.QueryValidatorWhitelistResponse, error)
func (Keeper) ValidatorWhitelistSwitch ¶
func (k Keeper) ValidatorWhitelistSwitch(goCtx context.Context, req *types.QueryValidatorWhitelistSwitchRequest) (*types.QueryValidatorWhitelistSwitchResponse, error)
Source Files ¶
- grpc_query.go
- grpc_query_delegator_whitelist.go
- grpc_query_delegator_whitelist_switch.go
- grpc_query_inflation_base.go
- grpc_query_params.go
- grpc_query_validator_whitelist.go
- grpc_query_validator_whitelist_switch.go
- hooks.go
- keeper.go
- msg_server.go
- msg_server_add_delegator_to_whitelist.go
- msg_server_add_val_to_whitelist.go
- msg_server_provide_token.go
- msg_server_rm_delegator_from_whitelist.go
- msg_server_set_inflation_base.go
- msg_server_toggle_delegator_whitelist_switch.go
- msg_server_toggle_validator_whitelist_switch.go
- msg_server_withdraw.go
- params.go
Click to show internal directories.
Click to hide internal directories.