Documentation ¶
Index ¶
- Constants
- Variables
- func CalcBondedRatio(p *BondPool) sdk.Dec
- func NewQuerier(k Keeper, cdc *codec.Codec) sdk.Querier
- type AssetViewKeeper
- type BondPool
- type DistributionKeeper
- type ExpectBankxKeeper
- type ExpectSupplyKeeper
- type Keeper
- func (k Keeper) CalcBondPoolStatus(ctx sdk.Context) BondPool
- func (k Keeper) GetAllVestingAccountAddresses(ctx sdk.Context) []sdk.AccAddress
- func (k Keeper) GetCetOwnerAddress(ctx sdk.Context) sdk.AccAddress
- func (k Keeper) GetMinMandatoryCommissionRate(ctx sdk.Context) (rate sdk.Dec)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) SetNonBondableAddresses(ctx sdk.Context, addresses []sdk.AccAddress)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- type MockKeeper
Constants ¶
View Source
const ( QueryPool = "pool" QueryParameters = "parameters" )
Query endpoints supported by the slashing querier
Variables ¶
View Source
var (
NonBondableAddressesKey = []byte("0x01")
)
Functions ¶
func CalcBondedRatio ¶
Types ¶
type AssetViewKeeper ¶
type BondPool ¶
type BondPool struct { NotBondedTokens sdk.Int `json:"not_bonded_tokens"` // tokens which are not bonded to a validator (unbonded or unbonding) BondedTokens sdk.Int `json:"bonded_tokens"` // tokens which are currently bonded to a validator NonBondableTokens sdk.Int `json:"non_bondable_tokens"` // tokens which are in locked positions and non-bondable TotalSupply sdk.Int `json:"total_supply"` // total token supply BondRatio sdk.Dec `json:"bonded_ratio"` // bonded ratio }
type DistributionKeeper ¶
type DistributionKeeper interface { GetFeePool(ctx sdk.Context) (feePool types.FeePool) SetFeePool(ctx sdk.Context, feePool types.FeePool) GetFeePoolCommunityCoins(ctx sdk.Context) sdk.DecCoins IterateValidatorOutstandingRewards(ctx sdk.Context, handler func(val sdk.ValAddress, rewards types.ValidatorOutstandingRewards) (stop bool)) }
type ExpectBankxKeeper ¶
type ExpectSupplyKeeper ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(key sdk.StoreKey, cdc *codec.Codec, paramSubspace params.Subspace, assetViewKeeper AssetViewKeeper, sk *staking.Keeper, dk DistributionKeeper, ak auth.AccountKeeper, bk ExpectBankxKeeper, supplyKeeper ExpectSupplyKeeper, feeCollectorName string) Keeper
func (Keeper) GetAllVestingAccountAddresses ¶
func (k Keeper) GetAllVestingAccountAddresses(ctx sdk.Context) []sdk.AccAddress
func (Keeper) GetCetOwnerAddress ¶
func (k Keeper) GetCetOwnerAddress(ctx sdk.Context) sdk.AccAddress
func (Keeper) GetMinMandatoryCommissionRate ¶
func (Keeper) SetNonBondableAddresses ¶
func (k Keeper) SetNonBondableAddresses(ctx sdk.Context, addresses []sdk.AccAddress)
type MockKeeper ¶
type MockKeeper struct { Keeper Sk *staking.Keeper Dk DistributionKeeper Ak auth.AccountKeeper Bk ExpectBankxKeeper SupplyKeeper ExpectSupplyKeeper }
func InitStates ¶
func InitStates(ctx sdk.Context, sxk Keeper, ak auth.AccountKeeper, splk supply.Keeper) MockKeeper
Click to show internal directories.
Click to hide internal directories.