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, ...) (sdk.Dec, 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) (totalConsumedOzone sdk.Dec, err error)
- func (k Keeper) GetEpochReward(ctx sdk.Context, epoch sdk.Int) (value []types.Reward)
- 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) GetNodesRewards(ctx sdk.Context, params QueryPotRewardsParams) (res []NodeRewardsInfo)
- func (k Keeper) GetNodesRewardsByOwner(ctx sdk.Context, params QueryPotRewardsByOwnerParams) (res []NodeRewardsInfo)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPotRewardsByEpoch(ctx sdk.Context, params QueryPotRewardsByepochParams) (res []types.Reward)
- 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, epoch sdk.Int) (res types.ReportRecord, err 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, epoch sdk.Int, reportRecord types.ReportRecord)
- func (k Keeper) Withdraw(ctx sdk.Context, amount sdk.Coin, nodeAddress sdk.AccAddress, ...) error
- type NodeRewardsInfo
- type QueryPotRewardsByOwnerParams
- type QueryPotRewardsByepochParams
- type QueryPotRewardsParams
Constants ¶
View Source
const ( QueryVolumeReport = "volume_report" QueryPotRewards = "pot_rewards" QueryPotRewardsByEpoch = "pot_rewards_by_epoch" QueryPotRewardsByOwner = "pot_rewards_by_owner" QueryDefaultLimit = 100 )
View Source
const (
StratosBech32Prefix = "st"
)
Variables ¶
View Source
var ( AccountPubKeyPrefix = StratosBech32Prefix + "pub" ValidatorAddressPrefix = StratosBech32Prefix + "valoper" ValidatorPubKeyPrefix = StratosBech32Prefix + "valoperpub" ConsNodeAddressPrefix = StratosBech32Prefix + "valcons" ConsNodePubKeyPrefix = StratosBech32Prefix + "valconspub" SdsNodeP2PKeyPrefix = StratosBech32Prefix + "sdsp2p" )
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, ) (sdk.Dec, types.DistributeGoal, error)
func (Keeper) DistributePotReward ¶
func (Keeper) GetEpochReward ¶ added in v0.4.0
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) GetNodesRewards ¶ added in v0.4.0
func (k Keeper) GetNodesRewards(ctx sdk.Context, params QueryPotRewardsParams) (res []NodeRewardsInfo)
func (Keeper) GetNodesRewardsByOwner ¶ added in v0.4.0
func (k Keeper) GetNodesRewardsByOwner(ctx sdk.Context, params QueryPotRewardsByOwnerParams) (res []NodeRewardsInfo)
func (Keeper) GetPotRewardsByEpoch ¶ added in v0.4.0
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 ¶
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 ¶
type NodeRewardsInfo ¶ added in v0.4.0
type NodeRewardsInfo struct { NodeAddress sdk.AccAddress MatureTotalReward sdk.Coin ImmatureTotalReward sdk.Coin }
func NewNodeRewardsInfo ¶ added in v0.4.0
func NewNodeRewardsInfo( nodeAddress sdk.AccAddress, matureTotal, immatureTotal sdk.Int, ) NodeRewardsInfo
NewNodeRewardsInfo creates a new instance of NodeRewardsInfo
type QueryPotRewardsByOwnerParams ¶ added in v0.4.0
type QueryPotRewardsByOwnerParams struct { Page int Limit int OwnerAddr sdk.AccAddress Height int64 }
func NewQueryPotRewardsByOwnerParams ¶ added in v0.4.0
func NewQueryPotRewardsByOwnerParams(page, limit int, ownerAddr sdk.AccAddress, height int64) QueryPotRewardsByOwnerParams
NewQueryPotRewardsByOwnerParams creates a new instance of QueryPotRewardsParams
type QueryPotRewardsByepochParams ¶ added in v0.4.0
type QueryPotRewardsByepochParams struct { Page int Limit int OwnerAddr sdk.AccAddress Epoch sdk.Int }
func NewQueryPotRewardsByepochParams ¶ added in v0.4.0
func NewQueryPotRewardsByepochParams(page, limit int, ownerAddr sdk.AccAddress, epoch sdk.Int) QueryPotRewardsByepochParams
NewQueryPotRewardsByepochParams creates a new instance of QueryPotRewardsParams
type QueryPotRewardsParams ¶ added in v0.4.0
func NewQueryPotRewardsParams ¶ added in v0.4.0
func NewQueryPotRewardsParams(page, limit int, nodeAddr sdk.AccAddress, epoch sdk.Int) QueryPotRewardsParams
NewQueryPotRewardsParams creates a new instance of QueryPotRewardsParams
Click to show internal directories.
Click to hide internal directories.