Documentation ¶
Index ¶
- Constants
- Variables
- func MakeTestCodec() *codec.Codec
- func NewQuerier(k Keeper) sdk.Querier
- func SetConfig()
- type Keeper
- func (k Keeper) BondDenom(ctx sdk.Context) (res string)
- func (k Keeper) CalcMiningRewardInTotal(ctx sdk.Context, distributeGoal types.DistributeGoal) (types.DistributeGoal, error)
- func (k Keeper) CalcRewardForIndexingNode(ctx sdk.Context, distributeGoal types.DistributeGoal, ...) (map[string]types.Reward, types.DistributeGoal)
- func (k Keeper) CalcRewardForResourceNode(ctx sdk.Context, trafficList []types.SingleNodeVolume, ...) (map[string]types.Reward, types.DistributeGoal)
- func (k Keeper) CalcTrafficRewardInTotal(ctx sdk.Context, trafficList []types.SingleNodeVolume, ...) (types.DistributeGoal, error)
- func (k Keeper) DeleteVolumeReport(ctx sdk.Context, key []byte)
- func (k Keeper) DistributePotReward(ctx sdk.Context, trafficList []types.SingleNodeVolume, epoch sdk.Int) (err error)
- func (k Keeper) GetFoundationAccount(ctx sdk.Context) (acc sdk.AccAddress)
- func (k Keeper) GetImmatureTotalReward(ctx sdk.Context, acc sdk.AccAddress) (value sdk.Int)
- func (k Keeper) GetIndividualReward(ctx sdk.Context, acc sdk.AccAddress, epoch sdk.Int) (value sdk.Int)
- func (k Keeper) GetInitialUOzonePrice(ctx sdk.Context) (price sdk.Int)
- func (k Keeper) GetMatureTotalReward(ctx sdk.Context, acc sdk.AccAddress) (value sdk.Int)
- func (k Keeper) GetMinedTokens(ctx sdk.Context, epoch sdk.Int) (minedToken sdk.Int)
- func (k Keeper) GetMiningRewardParamByMinedToken(ctx sdk.Context, minedToken sdk.Int) (types.MiningRewardParam, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetRewardAddressPool(ctx sdk.Context) (addressList []sdk.AccAddress)
- func (k Keeper) GetTotalConsumedOzone(trafficList []types.SingleNodeVolume) sdk.Int
- func (k Keeper) GetTotalMinedTokens(ctx sdk.Context) (totalMinedToken sdk.Int)
- func (k Keeper) GetTotalUnissuedPrepay(ctx sdk.Context) (totalUnissuedPrepay sdk.Int)
- func (k Keeper) GetVolumeReport(ctx sdk.Context, reporter sdk.AccAddress) ([]byte, error)
- func (k Keeper) IsSPNode(ctx sdk.Context, addr sdk.AccAddress) (found bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MatureEpoch(ctx sdk.Context) (res int64)
- func (k Keeper) MiningRewardParams(ctx sdk.Context) (res []types.MiningRewardParam)
- func (k Keeper) SetFoundationAccount(ctx sdk.Context, acc sdk.AccAddress)
- func (k Keeper) SetInitialUOzonePrice(ctx sdk.Context, price sdk.Int)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetTotalUnissuedPrepay(ctx sdk.Context, totalUnissuedPrepay sdk.Int)
- func (k Keeper) SetVolumeReport(ctx sdk.Context, reporter sdk.AccAddress, reportReference string)
- func (k Keeper) Withdraw(ctx sdk.Context, amount sdk.Coin, nodeAddress sdk.AccAddress, ...) error
Constants ¶
View Source
const (
AccountAddressPrefix = "st"
)
View Source
const QueryVolumeReport = "volume_report"
Variables ¶
View Source
var ( AccountPubKeyPrefix = AccountAddressPrefix + "pub" ValidatorAddressPrefix = AccountAddressPrefix + "valoper" ValidatorPubKeyPrefix = AccountAddressPrefix + "valoperpub" ConsNodeAddressPrefix = AccountAddressPrefix + "valcons" ConsNodePubKeyPrefix = AccountAddressPrefix + "valconspub" )
Functions ¶
func NewQuerier ¶
NewQuerier creates a new querier for pot clients.
Types ¶
type Keeper ¶
type Keeper struct { BankKeeper bank.Keeper SupplyKeeper supply.Keeper AccountKeeper auth.AccountKeeper StakingKeeper staking.Keeper RegisterKeeper register.Keeper // contains filtered or unexported fields }
Keeper of the pot store
func CreateTestInput ¶
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramSpace params.Subspace, feeCollectorName string, bankKeeper bank.Keeper, supplyKeeper supply.Keeper, accountKeeper auth.AccountKeeper, stakingKeeper staking.Keeper, registerKeeper register.Keeper, ) Keeper
NewKeeper creates a pot keeper
func (Keeper) CalcMiningRewardInTotal ¶
func (k Keeper) CalcMiningRewardInTotal(ctx sdk.Context, distributeGoal types.DistributeGoal) (types.DistributeGoal, error)
allocate mining reward from foundation account
func (Keeper) CalcRewardForIndexingNode ¶
func (Keeper) CalcRewardForResourceNode ¶
func (k Keeper) CalcRewardForResourceNode(ctx sdk.Context, trafficList []types.SingleNodeVolume, distributeGoal types.DistributeGoal, rewardDetailMap map[string]types.Reward, ) (map[string]types.Reward, types.DistributeGoal)
func (Keeper) CalcTrafficRewardInTotal ¶
func (k Keeper) CalcTrafficRewardInTotal( ctx sdk.Context, trafficList []types.SingleNodeVolume, distributeGoal types.DistributeGoal, ) (types.DistributeGoal, error)
func (Keeper) DistributePotReward ¶
func (Keeper) GetFoundationAccount ¶
func (k Keeper) GetFoundationAccount(ctx sdk.Context) (acc sdk.AccAddress)
func (Keeper) GetImmatureTotalReward ¶
func (Keeper) GetIndividualReward ¶
func (Keeper) GetInitialUOzonePrice ¶
func (Keeper) GetMatureTotalReward ¶
func (Keeper) GetMinedTokens ¶
func (Keeper) GetMiningRewardParamByMinedToken ¶
func (Keeper) GetRewardAddressPool ¶
func (k Keeper) GetRewardAddressPool(ctx sdk.Context) (addressList []sdk.AccAddress)
func (Keeper) GetTotalConsumedOzone ¶
func (k Keeper) GetTotalConsumedOzone(trafficList []types.SingleNodeVolume) sdk.Int
func (Keeper) GetTotalMinedTokens ¶
func (Keeper) GetTotalUnissuedPrepay ¶
func (Keeper) GetVolumeReport ¶
GetVolumeReport returns the hash of volume report
func (Keeper) MiningRewardParams ¶
func (k Keeper) MiningRewardParams(ctx sdk.Context) (res []types.MiningRewardParam)
func (Keeper) SetFoundationAccount ¶
func (k Keeper) SetFoundationAccount(ctx sdk.Context, acc sdk.AccAddress)
func (Keeper) SetInitialUOzonePrice ¶
func (Keeper) SetTotalUnissuedPrepay ¶
func (Keeper) SetVolumeReport ¶
Click to show internal directories.
Click to hide internal directories.