Documentation
¶
Index ¶
- Constants
- func NewLegacyQueryServer(originalServer stakingtypes.QueryServer, legacySubspace paramtypes.Subspace, ...) stakingtypes.QueryServer
- type AppModule
- type AppModuleBasic
- type LegacyQueryServer
- func (q *LegacyQueryServer) Delegation(ctx context.Context, req *stakingtypes.QueryDelegationRequest) (*stakingtypes.QueryDelegationResponse, error)
- func (q *LegacyQueryServer) DelegatorDelegations(ctx context.Context, req *stakingtypes.QueryDelegatorDelegationsRequest) (*stakingtypes.QueryDelegatorDelegationsResponse, error)
- func (q *LegacyQueryServer) DelegatorUnbondingDelegations(ctx context.Context, ...) (*stakingtypes.QueryDelegatorUnbondingDelegationsResponse, error)
- func (q *LegacyQueryServer) DelegatorValidator(ctx context.Context, req *stakingtypes.QueryDelegatorValidatorRequest) (*stakingtypes.QueryDelegatorValidatorResponse, error)
- func (q *LegacyQueryServer) DelegatorValidators(ctx context.Context, req *stakingtypes.QueryDelegatorValidatorsRequest) (*stakingtypes.QueryDelegatorValidatorsResponse, error)
- func (q *LegacyQueryServer) HistoricalInfo(ctx context.Context, req *stakingtypes.QueryHistoricalInfoRequest) (*stakingtypes.QueryHistoricalInfoResponse, error)
- func (q *LegacyQueryServer) Params(ctx context.Context, req *stakingtypes.QueryParamsRequest) (*stakingtypes.QueryParamsResponse, error)
- func (q *LegacyQueryServer) Pool(ctx context.Context, req *stakingtypes.QueryPoolRequest) (*stakingtypes.QueryPoolResponse, error)
- func (q *LegacyQueryServer) Redelegations(ctx context.Context, req *stakingtypes.QueryRedelegationsRequest) (*stakingtypes.QueryRedelegationsResponse, error)
- func (q *LegacyQueryServer) UnbondingDelegation(ctx context.Context, req *stakingtypes.QueryUnbondingDelegationRequest) (*stakingtypes.QueryUnbondingDelegationResponse, error)
- func (q *LegacyQueryServer) Validator(ctx context.Context, req *stakingtypes.QueryValidatorRequest) (*stakingtypes.QueryValidatorResponse, error)
- func (q *LegacyQueryServer) ValidatorDelegations(ctx context.Context, req *stakingtypes.QueryValidatorDelegationsRequest) (*stakingtypes.QueryValidatorDelegationsResponse, error)
- func (q *LegacyQueryServer) ValidatorUnbondingDelegations(ctx context.Context, ...) (*stakingtypes.QueryValidatorUnbondingDelegationsResponse, error)
- func (q *LegacyQueryServer) Validators(ctx context.Context, req *stakingtypes.QueryValidatorsRequest) (*stakingtypes.QueryValidatorsResponse, error)
- type TerraStakingHooks
- func (h TerraStakingHooks) AfterDelegationModified(ctx context.Context, _ sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h TerraStakingHooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error
- func (h TerraStakingHooks) AfterValidatorBeginUnbonding(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h TerraStakingHooks) AfterValidatorBonded(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h TerraStakingHooks) AfterValidatorCreated(_ context.Context, _ sdk.ValAddress) error
- func (h TerraStakingHooks) AfterValidatorRemoved(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h TerraStakingHooks) BeforeDelegationCreated(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h TerraStakingHooks) BeforeDelegationRemoved(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h TerraStakingHooks) BeforeDelegationSharesModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h TerraStakingHooks) BeforeValidatorModified(_ context.Context, _ sdk.ValAddress) error
- func (h TerraStakingHooks) BeforeValidatorSlashed(_ context.Context, _ sdk.ValAddress, _ math.LegacyDec) error
Constants ¶
const (
ColumbusChainID = "columbus-5"
)
Variables ¶
This section is empty.
Functions ¶
func NewLegacyQueryServer ¶
func NewLegacyQueryServer( originalServer stakingtypes.QueryServer, legacySubspace paramtypes.Subspace, keeper *keeper.Keeper, cdc codec.BinaryCodec, storeKey storetypes.StoreKey, distrStoreKey storetypes.StoreKey, ) stakingtypes.QueryServer
NewLegacyQueryServer creates a new LegacyQueryServer instance.
`cdc` and `storeKey` are required for the pre-v5-staking-migration ValidatorDelegations fallback path, which uses x/distribution's DelegatorStartingInfo prefix (0x04 || valAddr || delAddr) to enumerate a validator's delegators when staking's reverse-index (0x71) hasn't been backfilled at the queried height.
Types ¶
type AppModule ¶
AppModule implements an application module for the staking module.
func NewAppModule ¶
func NewAppModule(cdc codec.Codec, keeper *keeper.Keeper, ak stakingtypes.AccountKeeper, bk stakingtypes.BankKeeper, pk paramskeeper.Keeper, ss paramtypes.Subspace, storeKey storetypes.StoreKey, distrStoreKey storetypes.StoreKey, ) AppModule
NewAppModule creates a new AppModule object
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
RegisterServices registers module services.
type AppModuleBasic ¶
type AppModuleBasic struct {
staking.AppModuleBasic
}
AppModuleBasic defines the basic application module used by the staking module.
func (AppModuleBasic) DefaultGenesis ¶
func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the gov module.
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the staking module's types for the given codec.
type LegacyQueryServer ¶
type LegacyQueryServer struct {
// Embed the original query server to inherit all methods
stakingtypes.QueryServer
// contains filtered or unexported fields
}
LegacyQueryServer wraps the staking QueryServer and sets legacy parameters for pre-upgrade height queries
func (*LegacyQueryServer) Delegation ¶
func (q *LegacyQueryServer) Delegation(ctx context.Context, req *stakingtypes.QueryDelegationRequest) (*stakingtypes.QueryDelegationResponse, error)
func (*LegacyQueryServer) DelegatorDelegations ¶
func (q *LegacyQueryServer) DelegatorDelegations(ctx context.Context, req *stakingtypes.QueryDelegatorDelegationsRequest) (*stakingtypes.QueryDelegatorDelegationsResponse, error)
func (*LegacyQueryServer) DelegatorUnbondingDelegations ¶
func (q *LegacyQueryServer) DelegatorUnbondingDelegations(ctx context.Context, req *stakingtypes.QueryDelegatorUnbondingDelegationsRequest) (*stakingtypes.QueryDelegatorUnbondingDelegationsResponse, error)
func (*LegacyQueryServer) DelegatorValidator ¶
func (q *LegacyQueryServer) DelegatorValidator(ctx context.Context, req *stakingtypes.QueryDelegatorValidatorRequest) (*stakingtypes.QueryDelegatorValidatorResponse, error)
func (*LegacyQueryServer) DelegatorValidators ¶
func (q *LegacyQueryServer) DelegatorValidators(ctx context.Context, req *stakingtypes.QueryDelegatorValidatorsRequest) (*stakingtypes.QueryDelegatorValidatorsResponse, error)
func (*LegacyQueryServer) HistoricalInfo ¶
func (q *LegacyQueryServer) HistoricalInfo(ctx context.Context, req *stakingtypes.QueryHistoricalInfoRequest) (*stakingtypes.QueryHistoricalInfoResponse, error)
func (*LegacyQueryServer) Params ¶
func (q *LegacyQueryServer) Params(ctx context.Context, req *stakingtypes.QueryParamsRequest) (*stakingtypes.QueryParamsResponse, error)
func (*LegacyQueryServer) Pool ¶
func (q *LegacyQueryServer) Pool(ctx context.Context, req *stakingtypes.QueryPoolRequest) (*stakingtypes.QueryPoolResponse, error)
func (*LegacyQueryServer) Redelegations ¶
func (q *LegacyQueryServer) Redelegations(ctx context.Context, req *stakingtypes.QueryRedelegationsRequest) (*stakingtypes.QueryRedelegationsResponse, error)
func (*LegacyQueryServer) UnbondingDelegation ¶
func (q *LegacyQueryServer) UnbondingDelegation(ctx context.Context, req *stakingtypes.QueryUnbondingDelegationRequest) (*stakingtypes.QueryUnbondingDelegationResponse, error)
func (*LegacyQueryServer) Validator ¶
func (q *LegacyQueryServer) Validator(ctx context.Context, req *stakingtypes.QueryValidatorRequest) (*stakingtypes.QueryValidatorResponse, error)
func (*LegacyQueryServer) ValidatorDelegations ¶
func (q *LegacyQueryServer) ValidatorDelegations(ctx context.Context, req *stakingtypes.QueryValidatorDelegationsRequest) (*stakingtypes.QueryValidatorDelegationsResponse, error)
func (*LegacyQueryServer) ValidatorUnbondingDelegations ¶
func (q *LegacyQueryServer) ValidatorUnbondingDelegations(ctx context.Context, req *stakingtypes.QueryValidatorUnbondingDelegationsRequest) (*stakingtypes.QueryValidatorUnbondingDelegationsResponse, error)
func (*LegacyQueryServer) Validators ¶
func (q *LegacyQueryServer) Validators(ctx context.Context, req *stakingtypes.QueryValidatorsRequest) (*stakingtypes.QueryValidatorsResponse, error)
type TerraStakingHooks ¶
type TerraStakingHooks struct {
// contains filtered or unexported fields
}
TerraStakingHooks implements staking hooks to enforce validator power limit
func NewTerraStakingHooks ¶
func NewTerraStakingHooks(sk stakingkeeper.Keeper) *TerraStakingHooks
func (TerraStakingHooks) AfterDelegationModified ¶
func (h TerraStakingHooks) AfterDelegationModified(ctx context.Context, _ sdk.AccAddress, valAddr sdk.ValAddress) error
Other required hook methods with empty implementations
func (TerraStakingHooks) AfterUnbondingInitiated ¶
func (h TerraStakingHooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error
func (TerraStakingHooks) AfterValidatorBeginUnbonding ¶
func (h TerraStakingHooks) AfterValidatorBeginUnbonding(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
func (TerraStakingHooks) AfterValidatorBonded ¶
func (h TerraStakingHooks) AfterValidatorBonded(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
func (TerraStakingHooks) AfterValidatorCreated ¶
func (h TerraStakingHooks) AfterValidatorCreated(_ context.Context, _ sdk.ValAddress) error
Add this method to TerraStakingHooks
func (TerraStakingHooks) AfterValidatorRemoved ¶
func (h TerraStakingHooks) AfterValidatorRemoved(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
func (TerraStakingHooks) BeforeDelegationCreated ¶
func (h TerraStakingHooks) BeforeDelegationCreated(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
Implement required staking hooks interface methods
func (TerraStakingHooks) BeforeDelegationRemoved ¶
func (h TerraStakingHooks) BeforeDelegationRemoved(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
Add the missing method
func (TerraStakingHooks) BeforeDelegationSharesModified ¶
func (h TerraStakingHooks) BeforeDelegationSharesModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
func (TerraStakingHooks) BeforeValidatorModified ¶
func (h TerraStakingHooks) BeforeValidatorModified(_ context.Context, _ sdk.ValAddress) error
func (TerraStakingHooks) BeforeValidatorSlashed ¶
func (h TerraStakingHooks) BeforeValidatorSlashed(_ context.Context, _ sdk.ValAddress, _ math.LegacyDec) error