Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Hooks
- func (h Hooks) AfterDelegationModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h Hooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error
- func (h Hooks) AfterValidatorBeginUnbonding(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h Hooks) AfterValidatorBonded(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h Hooks) AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error
- func (h Hooks) AfterValidatorRemoved(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h Hooks) BeforeDelegationCreated(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h Hooks) BeforeDelegationRemoved(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h Hooks) BeforeDelegationSharesModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h Hooks) BeforeValidatorModified(_ context.Context, _ sdk.ValAddress) error
- func (h Hooks) BeforeValidatorSlashed(_ context.Context, _ sdk.ValAddress, _ math.LegacyDec) error
- type Keeper
- func (k Keeper) AllStakerInfo(goCtx context.Context, req *types.QueryAllStakerInfoRequest) (*types.QueryAllStakerInfoResponse, error)
- func (k Keeper) AppendStaker(ctx context.Context, stakerInfo types.StakerInfo)
- func (k *Keeper) BeginBlocker(ctx context.Context)
- func (k Keeper) CommitteeAddress(goCtx context.Context, req *types.QueryCommitteeAddressRequest) (*types.QueryCommitteeAddressResponse, error)
- func (k Keeper) DeleteStaker(ctx context.Context, stakerAddress string)
- func (k *Keeper) EndBlocker(ctx context.Context) error
- func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState
- func (k Keeper) GetAllStakerInfo(ctx context.Context, pagination *query.PageRequest) ([]types.StakerInfo, *query.PageResponse, error)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetCommitteeAddress(ctx context.Context) string
- func (k Keeper) GetParams(ctx context.Context) (params types.Params)
- func (k Keeper) GetRegisteredVKList(ctx context.Context, pagination *query.PageRequest) ([][]byte, *query.PageResponse, error)
- func (k Keeper) GetStaker(ctx context.Context, stakerAddress string) (types.StakerInfo, bool)
- func (k Keeper) GetStakerCount(ctx context.Context) uint64
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitGenesis(ctx context.Context, gs types.GenesisState) error
- func (k Keeper) IsVKRegistered(ctx context.Context, vk []byte) bool
- func (k Keeper) Logger() log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RegisterVK(ctx context.Context, vk []byte) error
- func (k Keeper) RegisteredVKList(goCtx context.Context, req *types.QueryRegisteredVKListRequest) (*types.QueryRegisteredVKListResponse, error)
- func (k Keeper) RemoveVK(ctx context.Context, vk []byte) error
- func (k Keeper) SetCommitteeAddress(ctx context.Context, committeeAddress string)
- func (k Keeper) SetParams(ctx context.Context, params types.Params) error
- func (k Keeper) SetStakerCount(ctx context.Context, count uint64)
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
}
Hooks wrapper struct
func (Hooks) AfterDelegationModified ¶
func (h Hooks) AfterDelegationModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
func (Hooks) AfterUnbondingInitiated ¶
func (Hooks) AfterValidatorBeginUnbonding ¶
func (h Hooks) AfterValidatorBeginUnbonding(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
func (Hooks) AfterValidatorBonded ¶
func (h Hooks) AfterValidatorBonded(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
AfterValidatorBonded updates the signing info start height or create a new signing info
func (Hooks) AfterValidatorCreated ¶
AfterValidatorCreated checks if the validator's operator address is whitelisted
func (Hooks) AfterValidatorRemoved ¶
func (h Hooks) AfterValidatorRemoved(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
AfterValidatorRemoved deletes the address-pubkey relation when a validator is removed,
func (Hooks) BeforeDelegationCreated ¶
func (h Hooks) BeforeDelegationCreated(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
func (Hooks) BeforeDelegationRemoved ¶
func (h Hooks) BeforeDelegationRemoved(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
func (Hooks) BeforeDelegationSharesModified ¶
func (h Hooks) BeforeDelegationSharesModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
func (Hooks) BeforeValidatorModified ¶
func (Hooks) BeforeValidatorSlashed ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, logger log.Logger, authority string, stakingKeeper types.StakingKeeper, ) Keeper
func (Keeper) AllStakerInfo ¶
func (k Keeper) AllStakerInfo(goCtx context.Context, req *types.QueryAllStakerInfoRequest) (*types.QueryAllStakerInfoResponse, error)
func (Keeper) AppendStaker ¶
func (k Keeper) AppendStaker(ctx context.Context, stakerInfo types.StakerInfo)
SetCommitteeAddress set the committee address to KVStore
func (*Keeper) BeginBlocker ¶
BeginBlocker will persist the current header and validator set as a historical entry and prune the oldest entry based on the HistoricalEntries parameter
func (Keeper) CommitteeAddress ¶
func (k Keeper) CommitteeAddress(goCtx context.Context, req *types.QueryCommitteeAddressRequest) (*types.QueryCommitteeAddressResponse, error)
func (Keeper) DeleteStaker ¶
GetCommitteeAddress gets the committee address from KVStore
func (*Keeper) EndBlocker ¶
EndBlocker Called every block, update validator set
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState
ExportGenesis returns the module's exported genesis
func (Keeper) GetAllStakerInfo ¶
func (k Keeper) GetAllStakerInfo(ctx context.Context, pagination *query.PageRequest) ([]types.StakerInfo, *query.PageResponse, error)
func (Keeper) GetAuthority ¶
GetAuthority returns the module's authority.
func (Keeper) GetCommitteeAddress ¶
GetCommitteeAddress gets the committee address from KVStore
func (Keeper) GetRegisteredVKList ¶
func (k Keeper) GetRegisteredVKList(ctx context.Context, pagination *query.PageRequest) ([][]byte, *query.PageResponse, error)
GetRegisteredVKList retrieves the list of registered VKs with pagination
func (Keeper) InitGenesis ¶
InitGenesis initializes the module's state from a provided genesis state.
func (Keeper) IsVKRegistered ¶
IsVKRegistered checks if a VK is registered
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RegisterVK ¶
RegisterVK registers a new VK
func (Keeper) RegisteredVKList ¶
func (k Keeper) RegisteredVKList(goCtx context.Context, req *types.QueryRegisteredVKListRequest) (*types.QueryRegisteredVKListResponse, error)
func (Keeper) SetCommitteeAddress ¶
SetCommitteeAddress set the committee address to KVStore
Source Files ¶
- abci.go
- committee.go
- genesis.go
- hooks.go
- keeper.go
- msg_server.go
- msg_server_create_staker.go
- msg_server_register_vk.go
- msg_server_remove_staker.go
- msg_server_remove_vk.go
- msg_server_update_committee_address.go
- msg_update_params.go
- params.go
- query.go
- query_all_staker_info.go
- query_committee_address.go
- query_params.go
- query_registered_vk.go
- registration_vk.go
- staker.go