Versions in this module Expand all Collapse all v0 v0.4.4 Dec 19, 2024 Changes in this version + func NewMsgServerImpl(keeper Keeper) types.MsgServer + func NewQueryServerImpl(keeper Keeper) types.QueryServer + type Hooks struct + func (h Hooks) AfterDelegationModified(ctx context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error + func (h Hooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error + func (h Hooks) AfterValidatorBeginUnbonding(ctx context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error + func (h Hooks) AfterValidatorBonded(ctx context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error + func (h Hooks) AfterValidatorCreated(_ context.Context, _ sdk.ValAddress) error + func (h Hooks) AfterValidatorRemoved(ctx context.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) (err error) + func (h Hooks) AfterValidatorSlashed(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress, _ math.LegacyDec) + 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(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error + type Keeper struct + func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, ...) Keeper + func (k Keeper) AddAssetsToRewardPool(ctx context.Context, from sdk.AccAddress, val types.AllianceValidator, ...) error + func (k Keeper) CalculateDelegationRewards(ctx context.Context, delegation types.Delegation, val types.AllianceValidator, ...) (sdk.Coins, types.RewardHistories, error) + func (k Keeper) ClaimDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, val types.AllianceValidator, ...) (sdk.Coins, error) + func (k Keeper) ClaimValidatorRewards(ctx context.Context, val types.AllianceValidator) (sdk.Coins, error) + func (k Keeper) ClearDustDelegation(ctx context.Context, delAddr sdk.AccAddress, validator types.AllianceValidator, ...) error + func (k Keeper) CompleteRedelegations(ctx sdk.Context) (deleted int) + func (k Keeper) CompleteUnbondings(ctx context.Context) error + func (k Keeper) ConsumeAssetRebalanceEvent(ctx context.Context) bool + func (k Keeper) CreateAlliance(ctx context.Context, req *types.MsgCreateAllianceProposal) error + func (k Keeper) DeductAssetsHook(ctx sdk.Context, assets []*types.AllianceAsset) (sdk.Coins, error) + func (k Keeper) DeductAssetsWithTakeRate(ctx sdk.Context, lastClaim time.Time, assets []*types.AllianceAsset) (sdk.Coins, error) + func (k Keeper) Delegate(ctx context.Context, delAddr sdk.AccAddress, validator types.AllianceValidator, ...) (*math.LegacyDec, error) + func (k Keeper) DeleteAlliance(ctx context.Context, req *types.MsgDeleteAllianceProposal) error + func (k Keeper) DeleteAsset(ctx context.Context, asset types.AllianceAsset) error + func (k Keeper) DeleteRedelegation(ctx context.Context, redel types.Redelegation, completion time.Time) error + func (k Keeper) DeleteValidatorInfo(ctx context.Context, valAddr sdk.ValAddress) error + func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState + func (k Keeper) GetAllAllianceValidatorInfo(ctx context.Context) (infos []types.AllianceValidatorInfo, err error) + func (k Keeper) GetAllAssets(ctx context.Context) (assets []*types.AllianceAsset) + func (k Keeper) GetAllianceBondedAmount(ctx context.Context, delegator sdk.AccAddress) (math.Int, error) + func (k Keeper) GetAllianceValidator(ctx context.Context, valAddr sdk.ValAddress) (types.AllianceValidator, error) + func (k Keeper) GetAllianceValidatorInfo(ctx context.Context, valAddr sdk.ValAddress) (types.AllianceValidatorInfo, bool) + func (k Keeper) GetAssetByDenom(ctx context.Context, denom string) (asset types.AllianceAsset, found bool) + func (k Keeper) GetAuthority() string + func (k Keeper) GetDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, ...) (d types.Delegation, found bool) + func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) + func (k Keeper) GetUnbondings(ctx sdk.Context, denom string, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (unbondingDelegations []types.UnbondingDelegation, err error) + func (k Keeper) GetUnbondingsByDelegator(ctx context.Context, delAddr sdk.AccAddress) (unbondingDelegations []types.UnbondingDelegation, err error) + func (k Keeper) GetUnbondingsByDenomAndDelegator(ctx context.Context, denom string, delAddr sdk.AccAddress) (unbondingDelegations []types.UnbondingDelegation, err error) + func (k Keeper) HasRedelegation(ctx context.Context, delAddr sdk.AccAddress, dstVal sdk.ValAddress, ...) bool + func (k Keeper) InitGenesis(ctx sdk.Context, g *types.GenesisState) []abci.ValidatorUpdate + func (k Keeper) InitializeAllianceAssets(ctx context.Context, assets []*types.AllianceAsset) (err error) + func (k Keeper) IterateAllWeightChangeSnapshot(ctx sdk.Context, ...) + func (k Keeper) IterateAllianceValidatorInfo(ctx context.Context, ...) (err error) + func (k Keeper) IterateDelegations(ctx context.Context, cb func(d types.Delegation) (stop bool)) (err error) + func (k Keeper) IterateRedelegations(ctx context.Context, ...) + func (k Keeper) IterateRedelegationsByDelegator(ctx context.Context, delAddr sdk.AccAddress) storetypes.Iterator + func (k Keeper) IterateRedelegationsBySrcValidator(ctx context.Context, srcValAddr sdk.ValAddress) storetypes.Iterator + func (k Keeper) IterateUndelegations(ctx context.Context, ...) + func (k Keeper) IterateUndelegationsByCompletionTime(ctx context.Context, completionTime time.Time) storetypes.Iterator + func (k Keeper) IterateUndelegationsBySrcValidator(ctx context.Context, valAddr sdk.ValAddress) storetypes.Iterator + func (k Keeper) IterateWeightChangeSnapshot(ctx context.Context, denom string, valAddr sdk.ValAddress, ...) (cstore.Iterator, error) + func (k Keeper) LastRewardClaimTime(ctx sdk.Context) (res time.Time) + func (k Keeper) Logger(ctx sdk.Context) log.Logger + func (k Keeper) QueueAssetRebalanceEvent(ctx context.Context) error + func (k Keeper) RebalanceBondTokenWeights(ctx context.Context, assets []*types.AllianceAsset) (err error) + func (k Keeper) RebalanceHook(ctx context.Context, assets []*types.AllianceAsset) error + func (k Keeper) Redelegate(ctx context.Context, delAddr sdk.AccAddress, srcVal types.AllianceValidator, ...) (*time.Time, error) + func (k Keeper) ResetAssetAndValidators(ctx context.Context, asset types.AllianceAsset) error + func (k Keeper) RewardClaimInterval(ctx sdk.Context) (res time.Duration) + func (k Keeper) RewardDelayTime(ctx sdk.Context) (res time.Duration) + func (k Keeper) RewardWeightChangeHook(ctx sdk.Context, assets []*types.AllianceAsset) error + func (k Keeper) SetAsset(ctx context.Context, asset types.AllianceAsset) error + func (k Keeper) SetDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, ...) error + func (k Keeper) SetLastRewardClaimTime(ctx sdk.Context, lastTime time.Time) error + func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error + func (k Keeper) SetRewardWeightChangeSnapshot(ctx context.Context, asset types.AllianceAsset, val types.AllianceValidator) error + func (k Keeper) SetValidator(ctx context.Context, val types.AllianceValidator) error + func (k Keeper) SetValidatorInfo(ctx context.Context, valAddr sdk.ValAddress, val types.AllianceValidatorInfo) error + func (k Keeper) SlashValidator(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error + func (k Keeper) StakingHooks() Hooks + func (k Keeper) StoreService() store.KVStoreService + func (k Keeper) Undelegate(ctx context.Context, delAddr sdk.AccAddress, validator types.AllianceValidator, ...) (*time.Time, error) + func (k Keeper) UpdateAlliance(ctx context.Context, req *types.MsgUpdateAllianceProposal) error + func (k Keeper) UpdateAllianceAsset(ctx context.Context, newAsset types.AllianceAsset) error + func (k Keeper) ValidateDelegatedAmount(delegation types.Delegation, coin sdk.Coin, val types.AllianceValidator, ...) (shares math.LegacyDec, err error) + type MsgServer struct + func (m MsgServer) ClaimDelegationRewards(ctx context.Context, msg *types.MsgClaimDelegationRewards) (*types.MsgClaimDelegationRewardsResponse, error) + func (m MsgServer) CreateAlliance(ctx context.Context, msg *types.MsgCreateAlliance) (*types.MsgCreateAllianceResponse, error) + func (m MsgServer) Delegate(ctx context.Context, msg *types.MsgDelegate) (*types.MsgDelegateResponse, error) + func (m MsgServer) DeleteAlliance(ctx context.Context, msg *types.MsgDeleteAlliance) (*types.MsgDeleteAllianceResponse, error) + func (m MsgServer) Redelegate(ctx context.Context, msg *types.MsgRedelegate) (*types.MsgRedelegateResponse, error) + func (m MsgServer) Undelegate(ctx context.Context, msg *types.MsgUndelegate) (*types.MsgUndelegateResponse, error) + func (m MsgServer) UpdateAlliance(ctx context.Context, msg *types.MsgUpdateAlliance) (*types.MsgUpdateAllianceResponse, error) + func (m MsgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) + type QueryServer struct + func (k QueryServer) AllAllianceValidators(c context.Context, req *types.QueryAllAllianceValidatorsRequest) (*types.QueryAllianceValidatorsResponse, error) + func (k QueryServer) AllAlliancesDelegations(c context.Context, req *types.QueryAllAlliancesDelegationsRequest) (*types.QueryAlliancesDelegationsResponse, error) + func (k QueryServer) Alliance(c context.Context, req *types.QueryAllianceRequest) (*types.QueryAllianceResponse, error) + func (k QueryServer) AllianceDelegation(c context.Context, req *types.QueryAllianceDelegationRequest) (*types.QueryAllianceDelegationResponse, error) + func (k QueryServer) AllianceDelegationRewards(context context.Context, req *types.QueryAllianceDelegationRewardsRequest) (*types.QueryAllianceDelegationRewardsResponse, error) + func (k QueryServer) AllianceRedelegations(c context.Context, req *types.QueryAllianceRedelegationsRequest) (*types.QueryAllianceRedelegationsResponse, error) + func (k QueryServer) AllianceRedelegationsByDelegator(c context.Context, req *types.QueryAllianceRedelegationsByDelegatorRequest) (*types.QueryAllianceRedelegationsByDelegatorResponse, error) + func (k QueryServer) AllianceUnbondings(c context.Context, req *types.QueryAllianceUnbondingsRequest) (*types.QueryAllianceUnbondingsResponse, error) + func (k QueryServer) AllianceUnbondingsByDelegator(c context.Context, req *types.QueryAllianceUnbondingsByDelegatorRequest) (*types.QueryAllianceUnbondingsByDelegatorResponse, error) + func (k QueryServer) AllianceUnbondingsByDenomAndDelegator(c context.Context, ...) (*types.QueryAllianceUnbondingsByDenomAndDelegatorResponse, error) + func (k QueryServer) AllianceValidator(c context.Context, req *types.QueryAllianceValidatorRequest) (*types.QueryAllianceValidatorResponse, error) + func (k QueryServer) Alliances(c context.Context, req *types.QueryAlliancesRequest) (*types.QueryAlliancesResponse, error) + func (k QueryServer) AlliancesDelegation(c context.Context, req *types.QueryAlliancesDelegationsRequest) (*types.QueryAlliancesDelegationsResponse, error) + func (k QueryServer) AlliancesDelegationByValidator(c context.Context, req *types.QueryAlliancesDelegationByValidatorRequest) (*types.QueryAlliancesDelegationsResponse, error) + func (k QueryServer) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) + type RewardsKeeper interface