Documentation
¶
Index ¶
- type CalculateEquivalentCoin
- type Hooks
- func (Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h Hooks) AfterEpochEnd(ctx sdk.Context, _ string, _ int64)
- func (Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h Hooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (Hooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error
- type Keeper
- func (k Keeper) CollectAgentsReward(ctx sdk.Context)
- func (k Keeper) CompleteUnbonding(ctx sdk.Context, delegator string, agentID uint64) (sdk.Coins, error)
- func (k Keeper) DecreaseMultiStakingShares(ctx sdk.Context, shares math.Int, agentID uint64, delegator string) error
- func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []types.DAPair)
- func (k Keeper) EndBlocker(ctx sdk.Context) ([]abci.ValidatorUpdate, error)
- func (k Keeper) GenerateAccount(ctx sdk.Context, prefix, suffix string) *authtypes.ModuleAccount
- func (k Keeper) GetAllAgent(ctx sdk.Context) []types.MultiStakingAgent
- func (k Keeper) GetAllAgentsByVal(ctx sdk.Context, valAddr sdk.ValAddress) []types.MultiStakingAgent
- func (k Keeper) GetExpectedDelegationAmount(ctx sdk.Context, coin sdk.Coin) (sdk.Coin, error)
- func (k Keeper) GetLatestMultiStakingAgentID(ctx sdk.Context) uint64
- func (k Keeper) GetMultiStakingAgent(ctx sdk.Context, denom string, valAddr string) (*types.MultiStakingAgent, bool)
- func (k Keeper) GetMultiStakingAgentByID(ctx sdk.Context, id uint64) (*types.MultiStakingAgent, bool)
- func (k Keeper) GetMultiStakingAgentIDByDenomAndVal(ctx sdk.Context, denom string, valAddr string) (uint64, bool)
- func (k Keeper) GetMultiStakingDenomWhiteList(ctx sdk.Context) (*types.MultiStakingDenomWhiteList, bool)
- func (k Keeper) GetMultiStakingShares(ctx sdk.Context, agentID uint64, delegator string) math.Int
- func (k Keeper) GetMultiStakingUnbonding(ctx sdk.Context, agentID uint64, delegatorAddr string) (*types.MultiStakingUnbonding, bool)
- func (k Keeper) GetOrCreateMultiStakingAgent(ctx sdk.Context, denom, valAddr string) *types.MultiStakingAgent
- func (k Keeper) GetOrCreateMultiStakingUnbonding(ctx sdk.Context, agentID uint64, delegatorAddr string) *types.MultiStakingUnbonding
- func (k Keeper) GetUBDQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (dvPairs []types.DAPair)
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IncreaseMultiStakingShares(ctx sdk.Context, shares math.Int, agentID uint64, delegator string) error
- func (k Keeper) InsertUBDQueue(ctx sdk.Context, ubd *types.MultiStakingUnbonding, completionTime time.Time)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MultiStakingDelegate(ctx sdk.Context, msg types.MsgMultiStakingDelegate) error
- func (k Keeper) MultiStakingUndelegate(ctx sdk.Context, msg *types.MsgMultiStakingUndelegate) error
- func (k Keeper) ProcessCompletedUnbonding(ctx sdk.Context)
- func (k Keeper) RefreshAgentDelegationAmount(ctx sdk.Context)
- func (k Keeper) RemoveMultiStakingUnbonding(ctx sdk.Context, agentID uint64, delegatorAddr string)
- func (k Keeper) SetLatestMultiStakingAgentID(ctx sdk.Context, id uint64)
- func (k Keeper) SetMultiStakingAgent(ctx sdk.Context, agent *types.MultiStakingAgent)
- func (k Keeper) SetMultiStakingAgentIDByDenomAndVal(ctx sdk.Context, id uint64, denom, valAddr string)
- func (k Keeper) SetMultiStakingDenom(ctx sdk.Context, denom string) bool
- func (k Keeper) SetMultiStakingUnbonding(ctx sdk.Context, agentID uint64, delegatorAddr string, ...)
- func (k Keeper) SetUBDQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys []types.DAPair)
- func (k Keeper) SlashAgentByValidatorSlash(ctx sdk.Context, valAddr sdk.ValAddress, slashFactor sdk.Dec)
- func (k Keeper) UBDQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator
- func (k Keeper) WithdrawRestakingReward(ctx sdk.Context, agentID uint64, delegator string) (sdk.Coin, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CalculateEquivalentCoin ¶
type CalculateEquivalentCoin func(ctx sdk.Context, coin sdk.Coin, targetDenom string) (sdk.Coin, error)
TODO Temporarily use this method to feed prices !!!
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
func (Hooks) AfterDelegationModified ¶
func (Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
AfterDelegationModified implements types.StakingHooks
func (Hooks) AfterValidatorBeginUnbonding ¶
func (Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
AfterValidatorBeginUnbonding implements types.StakingHooks
func (Hooks) AfterValidatorBonded ¶
func (Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
AfterValidatorBonded implements types.StakingHooks
func (Hooks) AfterValidatorCreated ¶
AfterValidatorCreated implements types.StakingHooks
func (Hooks) AfterValidatorRemoved ¶
func (Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
AfterValidatorRemoved implements types.StakingHooks
func (Hooks) BeforeDelegationCreated ¶
func (Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
BeforeDelegationCreated implements types.StakingHooks
func (Hooks) BeforeDelegationRemoved ¶
func (Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
BeforeDelegationRemoved implements types.StakingHooks
func (Hooks) BeforeDelegationSharesModified ¶
func (Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
BeforeDelegationSharesModified implements types.StakingHooks
func (Hooks) BeforeEpochStart ¶
BeforeEpochStart implements types.EpochHooks
func (Hooks) BeforeValidatorModified ¶
BeforeValidatorModified implements types.StakingHooks
func (Hooks) BeforeValidatorSlashed ¶
func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error
BeforeValidatorSlashed implements types.StakingHooks
type Keeper ¶
type Keeper struct { EquivalentCoinCalculator CalculateEquivalentCoin // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeKey storetypes.StoreKey, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, epochKeeper types.EpochKeeper, stakingKeeper types.StakingKeeper, distributionKeeper types.DistributionKeeper, ) Keeper
func (Keeper) CollectAgentsReward ¶
func (Keeper) CompleteUnbonding ¶
func (Keeper) DecreaseMultiStakingShares ¶
func (Keeper) DequeueAllMatureUBDQueue ¶
func (Keeper) EndBlocker ¶
func (Keeper) GenerateAccount ¶
func (Keeper) GetAllAgent ¶
func (k Keeper) GetAllAgent(ctx sdk.Context) []types.MultiStakingAgent
func (Keeper) GetAllAgentsByVal ¶
func (k Keeper) GetAllAgentsByVal(ctx sdk.Context, valAddr sdk.ValAddress) []types.MultiStakingAgent
func (Keeper) GetExpectedDelegationAmount ¶
func (Keeper) GetLatestMultiStakingAgentID ¶
func (Keeper) GetMultiStakingAgent ¶
func (Keeper) GetMultiStakingAgentByID ¶
func (Keeper) GetMultiStakingAgentIDByDenomAndVal ¶
func (Keeper) GetMultiStakingDenomWhiteList ¶
func (Keeper) GetMultiStakingShares ¶
func (Keeper) GetMultiStakingUnbonding ¶
func (Keeper) GetOrCreateMultiStakingAgent ¶
func (Keeper) GetOrCreateMultiStakingUnbonding ¶
func (Keeper) GetUBDQueueTimeSlice ¶
func (Keeper) IncreaseMultiStakingShares ¶
func (Keeper) InsertUBDQueue ¶
func (Keeper) MultiStakingDelegate ¶
func (Keeper) MultiStakingUndelegate ¶
func (Keeper) ProcessCompletedUnbonding ¶
func (Keeper) RefreshAgentDelegationAmount ¶
func (Keeper) RemoveMultiStakingUnbonding ¶
func (Keeper) SetLatestMultiStakingAgentID ¶
func (Keeper) SetMultiStakingAgent ¶
func (k Keeper) SetMultiStakingAgent(ctx sdk.Context, agent *types.MultiStakingAgent)
func (Keeper) SetMultiStakingAgentIDByDenomAndVal ¶
func (Keeper) SetMultiStakingDenom ¶
func (Keeper) SetMultiStakingUnbonding ¶
func (Keeper) SetUBDQueueTimeSlice ¶
func (Keeper) SlashAgentByValidatorSlash ¶
func (k Keeper) SlashAgentByValidatorSlash(ctx sdk.Context, valAddr sdk.ValAddress, slashFactor sdk.Dec)
TODO more detailed research about slash
func (Keeper) UBDQueueIterator ¶
UBDQueueIterator returns all the unbonding queue timeslices from time 0 until endTime.