keeper

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryParameters      = "parameters"
	QueryNameReward      = "name-reward"
	QueryValidatorReward = "validator-reward"
	QuerySavingsReward   = "savings-reward"
	QuerySavings         = "savings"
)

Variables

This section is empty.

Functions

func AccountMustBePresent

func AccountMustBePresent(supplyKeeper *supply.Keeper, accountName string)

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

Types

type Keeper

type Keeper struct {
	HraKeeper *hra.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramSpace params.Subspace, supplyKeeper supply.Keeper, stakingKeeper *staking.Keeper, hraKeeper *hra.Keeper) Keeper

func (Keeper) AllocateTokens

func (k Keeper) AllocateTokens(ctx sdk.Context, previousVotes []abci.VoteInfo)

AllocateTokens handles distribution of the collected fees

func (Keeper) AllocateTokensToValidator

func (k Keeper) AllocateTokensToValidator(ctx sdk.Context, val exported.ValidatorI, tokens sdk.DecCoins)

func (Keeper) ClaimSavingsStake

func (k Keeper) ClaimSavingsStake(ctx sdk.Context, sender sdk.AccAddress, amount sdk.Coins) error

func (Keeper) DecreaseNameStake

func (k Keeper) DecreaseNameStake(ctx sdk.Context)

func (Keeper) DeleteNameRewardEscrow

func (k Keeper) DeleteNameRewardEscrow(ctx sdk.Context, address sdk.AccAddress)

func (Keeper) DeleteNameRewardRateByAddress

func (k Keeper) DeleteNameRewardRateByAddress(ctx sdk.Context, address sdk.AccAddress)

func (Keeper) DeletePendingNameDistribution

func (k Keeper) DeletePendingNameDistribution(ctx sdk.Context)

func (Keeper) DeleteSavingsRewardEscrow

func (k Keeper) DeleteSavingsRewardEscrow(ctx sdk.Context, address sdk.AccAddress)

func (Keeper) DeleteSavingsRewardRateByAddress

func (k Keeper) DeleteSavingsRewardRateByAddress(ctx sdk.Context, address sdk.AccAddress)

func (Keeper) DeleteSavingsStakeByAddress

func (k Keeper) DeleteSavingsStakeByAddress(ctx sdk.Context, address sdk.AccAddress)

func (Keeper) DeleteValidatorAccumulatedRewards

func (k Keeper) DeleteValidatorAccumulatedRewards(ctx sdk.Context, val sdk.ValAddress)

delete accumulated rewards for a validator

func (Keeper) DepositName

func (k Keeper) DepositName(ctx sdk.Context, address sdk.AccAddress) (ok bool)

func (Keeper) DevelopmentFundShare

func (k Keeper) DevelopmentFundShare(ctx sdk.Context) (res sdk.Dec)

func (Keeper) DistributeFromAmc

func (k Keeper) DistributeFromAmc(ctx sdk.Context) (sdk.Coins, sdk.Coins, sdk.Coins)

func (Keeper) DistributeFromHhrm

func (k Keeper) DistributeFromHhrm(ctx sdk.Context, amount sdk.Coins)

func (Keeper) DistributeFromNvrp

func (k Keeper) DistributeFromNvrp(ctx sdk.Context)

func (Keeper) DistributeNameReward

func (k Keeper) DistributeNameReward(ctx sdk.Context, recipient sdk.AccAddress, amount sdk.DecCoins) error

func (Keeper) DistributeSavingsReward

func (k Keeper) DistributeSavingsReward(ctx sdk.Context, recipient sdk.AccAddress, amount sdk.DecCoins) error

func (Keeper) GetNameRewardEscrow

func (k Keeper) GetNameRewardEscrow(ctx sdk.Context, address sdk.AccAddress) sdk.DecCoins

func (Keeper) GetNameRewardLeftover

func (k Keeper) GetNameRewardLeftover(ctx sdk.Context, address sdk.AccAddress) sdk.Dec

func (Keeper) GetNameRewardRate

func (k Keeper) GetNameRewardRate(ctx sdk.Context) sdk.Dec

func (Keeper) GetNameRewardRateByAddress

func (k Keeper) GetNameRewardRateByAddress(ctx sdk.Context, address sdk.AccAddress) (sdk.Dec, bool)

func (Keeper) GetNameStake

func (k Keeper) GetNameStake(ctx sdk.Context) sdk.Dec

func (Keeper) GetNvrpRemainder

func (k Keeper) GetNvrpRemainder(ctx sdk.Context) sdk.DecCoins

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

func (Keeper) GetPendingNameDistribution

func (k Keeper) GetPendingNameDistribution(ctx sdk.Context) sdk.Coins

func (Keeper) GetSavingsRewardEscrow

func (k Keeper) GetSavingsRewardEscrow(ctx sdk.Context, address sdk.AccAddress) sdk.DecCoins

func (Keeper) GetSavingsRewardLeftover

func (k Keeper) GetSavingsRewardLeftover(ctx sdk.Context, address sdk.AccAddress) sdk.Dec

func (Keeper) GetSavingsRewardRate

func (k Keeper) GetSavingsRewardRate(ctx sdk.Context) sdk.Dec

func (Keeper) GetSavingsRewardRateByAddress

func (k Keeper) GetSavingsRewardRateByAddress(ctx sdk.Context, address sdk.AccAddress) (sdk.Dec, bool)

func (Keeper) GetSavingsStake

func (k Keeper) GetSavingsStake(ctx sdk.Context) sdk.Int

func (Keeper) GetSavingsStakeByAddress

func (k Keeper) GetSavingsStakeByAddress(ctx sdk.Context, address sdk.AccAddress) (sdk.Int, bool)

func (Keeper) GetValidatorAccumulatedRewards

func (k Keeper) GetValidatorAccumulatedRewards(ctx sdk.Context, val sdk.ValAddress) (rewards sdk.DecCoins)

get accumulated rewards for a validator

func (Keeper) HandleDepositSavings

func (k Keeper) HandleDepositSavings(ctx sdk.Context, sender sdk.AccAddress, amount sdk.Coins) error

func (Keeper) HandleWithdrawNameReward

func (k Keeper) HandleWithdrawNameReward(ctx sdk.Context, address sdk.AccAddress) error

Withdrawals are done in full with re-depositing the Name stake

func (Keeper) HandleWithdrawSavings

func (k Keeper) HandleWithdrawSavings(ctx sdk.Context, sender sdk.AccAddress) error

func (Keeper) HandleWithdrawSavingsInterest

func (k Keeper) HandleWithdrawSavingsInterest(ctx sdk.Context, sender sdk.AccAddress) error

func (Keeper) HandleWithdrawValidatorReward

func (k Keeper) HandleWithdrawValidatorReward(ctx sdk.Context, valAddr sdk.ValAddress) error

func (Keeper) HasSavings

func (k Keeper) HasSavings(ctx sdk.Context, address sdk.AccAddress) bool

func (Keeper) IncreaseNameStake

func (k Keeper) IncreaseNameStake(ctx sdk.Context)

func (Keeper) InsertNameDepositQueue

func (k Keeper) InsertNameDepositQueue(ctx sdk.Context, recipient sdk.AccAddress, scheduledFor time.Time)

func (Keeper) IterateNameDepositQueue

func (k Keeper) IterateNameDepositQueue(ctx sdk.Context, handler func(address sdk.AccAddress, endTime time.Time) (stop bool))

func (Keeper) IterateNameDepositQueueByTime

func (k Keeper) IterateNameDepositQueueByTime(ctx sdk.Context, endTime time.Time, cb func(address sdk.AccAddress, endTime time.Time) (stop bool))

func (Keeper) IterateNameRewardEscrow

func (k Keeper) IterateNameRewardEscrow(ctx sdk.Context, handler func(address sdk.AccAddress, amount sdk.DecCoins) (stop bool))

func (Keeper) IterateNameRewardLeftover

func (k Keeper) IterateNameRewardLeftover(ctx sdk.Context, handler func(address sdk.AccAddress, amount sdk.Dec) (stop bool))

func (Keeper) IterateNameRewardRateByAddress

func (k Keeper) IterateNameRewardRateByAddress(ctx sdk.Context, handler func(address sdk.AccAddress, rate sdk.Dec) (stop bool))

func (Keeper) IterateSavingsRewardEscrow

func (k Keeper) IterateSavingsRewardEscrow(ctx sdk.Context, handler func(address sdk.AccAddress, amount sdk.DecCoins) (stop bool))

func (Keeper) IterateSavingsRewardLeftover

func (k Keeper) IterateSavingsRewardLeftover(ctx sdk.Context, handler func(address sdk.AccAddress, amount sdk.Dec) (stop bool))

func (Keeper) IterateSavingsRewardRateByAddress

func (k Keeper) IterateSavingsRewardRateByAddress(ctx sdk.Context, handler func(address sdk.AccAddress, rate sdk.Dec) (stop bool))

func (Keeper) IterateSavingsStakeByAddress

func (k Keeper) IterateSavingsStakeByAddress(ctx sdk.Context, handler func(address sdk.AccAddress, rate sdk.Int) (stop bool))

func (Keeper) IterateValidatorAccumulatedRewards

func (k Keeper) IterateValidatorAccumulatedRewards(ctx sdk.Context, handler func(val sdk.ValAddress, rewards sdk.DecCoins) (stop bool))

iterate over validator accumulated rewards

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) NameDepositDelay

func (k Keeper) NameDepositDelay(ctx sdk.Context) (res time.Duration)

func (Keeper) NameDeposited

func (k Keeper) NameDeposited(ctx sdk.Context, address sdk.AccAddress) bool

func (Keeper) NameHooks

func (k Keeper) NameHooks() NameHooks

func (Keeper) RefundSavingsStake

func (k Keeper) RefundSavingsStake(ctx sdk.Context, recipient sdk.AccAddress, amount sdk.Coins) error

func (Keeper) RemoveFromNameDepositQueue

func (k Keeper) RemoveFromNameDepositQueue(ctx sdk.Context, address sdk.AccAddress, endTime time.Time)

func (Keeper) RewardWithdrawalBlockedPeriod

func (k Keeper) RewardWithdrawalBlockedPeriod(ctx sdk.Context) (res time.Duration)

func (Keeper) RewardWithdrawalEnabledTime

func (k Keeper) RewardWithdrawalEnabledTime(ctx sdk.Context) (res time.Time)

func (Keeper) SavingsSplitAdjustment

func (k Keeper) SavingsSplitAdjustment(ctx sdk.Context) (res sdk.Dec)

func (Keeper) ScheduledNameDepositQueueIterator

func (k Keeper) ScheduledNameDepositQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator

func (Keeper) SecurityTokenFundShare

func (k Keeper) SecurityTokenFundShare(ctx sdk.Context) (res sdk.Dec)

func (Keeper) SetNameRewardEscrow

func (k Keeper) SetNameRewardEscrow(ctx sdk.Context, address sdk.AccAddress, amount sdk.DecCoins)

func (Keeper) SetNameRewardLeftover

func (k Keeper) SetNameRewardLeftover(ctx sdk.Context, address sdk.AccAddress, leftover sdk.Dec)

func (Keeper) SetNameRewardRate

func (k Keeper) SetNameRewardRate(ctx sdk.Context, rate sdk.Dec)

func (Keeper) SetNameRewardRateByAddress

func (k Keeper) SetNameRewardRateByAddress(ctx sdk.Context, address sdk.AccAddress, rate sdk.Dec)

func (Keeper) SetNameStake

func (k Keeper) SetNameStake(ctx sdk.Context, stake sdk.Dec)

func (Keeper) SetNvrpRemainder

func (k Keeper) SetNvrpRemainder(ctx sdk.Context, remainder sdk.DecCoins)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

func (Keeper) SetPendingNameDistribution

func (k Keeper) SetPendingNameDistribution(ctx sdk.Context, distribution sdk.Coins)

func (Keeper) SetRewardWithdrawalEnabledTime

func (k Keeper) SetRewardWithdrawalEnabledTime(ctx sdk.Context, time time.Time)

func (Keeper) SetSavingsRewardEscrow

func (k Keeper) SetSavingsRewardEscrow(ctx sdk.Context, address sdk.AccAddress, amount sdk.DecCoins)

func (Keeper) SetSavingsRewardLeftover

func (k Keeper) SetSavingsRewardLeftover(ctx sdk.Context, address sdk.AccAddress, leftover sdk.Dec)

func (Keeper) SetSavingsRewardRate

func (k Keeper) SetSavingsRewardRate(ctx sdk.Context, rate sdk.Dec)

func (Keeper) SetSavingsRewardRateByAddress

func (k Keeper) SetSavingsRewardRateByAddress(ctx sdk.Context, address sdk.AccAddress, rate sdk.Dec)

func (Keeper) SetSavingsStake

func (k Keeper) SetSavingsStake(ctx sdk.Context, stake sdk.Int)

func (Keeper) SetSavingsStakeByAddress

func (k Keeper) SetSavingsStakeByAddress(ctx sdk.Context, address sdk.AccAddress, rate sdk.Int)

func (Keeper) SetValidatorAccumulatedRewards

func (k Keeper) SetValidatorAccumulatedRewards(ctx sdk.Context, val sdk.ValAddress, rewards sdk.DecCoins)

set accumulated rewards for a validator

func (Keeper) StakingHooks

func (k Keeper) StakingHooks() StakingHooks

func (Keeper) TransferFromDevelopmentFund

func (k Keeper) TransferFromDevelopmentFund(ctx sdk.Context, recipient sdk.AccAddress, amount sdk.Coins) error

func (Keeper) TransferFromSecurityTokenFund

func (k Keeper) TransferFromSecurityTokenFund(ctx sdk.Context, recipients []types.Recipients) error

type NameHooks

type NameHooks struct {
	// contains filtered or unexported fields
}

func (NameHooks) AfterFirstNameCreated

func (h NameHooks) AfterFirstNameCreated(ctx sdk.Context, address sdk.AccAddress) error

func (NameHooks) AfterLastNameRemoved

func (h NameHooks) AfterLastNameRemoved(ctx sdk.Context, address sdk.AccAddress) error

type StakingHooks

type StakingHooks struct {
	// contains filtered or unexported fields
}

func (StakingHooks) AfterDelegationModified

func (h StakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)

func (StakingHooks) AfterValidatorBeginUnbonding

func (h StakingHooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress)

func (StakingHooks) AfterValidatorBonded

func (h StakingHooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress)

func (StakingHooks) AfterValidatorCreated

func (h StakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)

func (StakingHooks) AfterValidatorRemoved

func (h StakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)

func (StakingHooks) BeforeDelegationCreated

func (h StakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)

func (StakingHooks) BeforeDelegationRemoved

func (h StakingHooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress)

func (StakingHooks) BeforeDelegationSharesModified

func (h StakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)

func (StakingHooks) BeforeValidatorModified

func (h StakingHooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress)

func (StakingHooks) BeforeValidatorSlashed

func (h StakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL