2019-02-13 15:01:50 -08:00
|
|
|
package keeper
|
|
|
|
|
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
2020-04-20 08:22:12 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/bank/exported"
|
2019-06-28 13:11:27 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/distribution/types"
|
2019-02-13 15:01:50 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
// get outstanding rewards
|
2019-03-06 10:54:12 -08:00
|
|
|
func (k Keeper) GetValidatorOutstandingRewardsCoins(ctx sdk.Context, val sdk.ValAddress) sdk.DecCoins {
|
2020-02-11 06:58:37 -08:00
|
|
|
return k.GetValidatorOutstandingRewards(ctx, val).Rewards
|
2019-02-13 15:01:50 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// get the community coins
|
|
|
|
func (k Keeper) GetFeePoolCommunityCoins(ctx sdk.Context) sdk.DecCoins {
|
|
|
|
return k.GetFeePool(ctx).CommunityPool
|
|
|
|
}
|
2019-06-28 13:11:27 -07:00
|
|
|
|
|
|
|
// GetDistributionAccount returns the distribution ModuleAccount
|
|
|
|
func (k Keeper) GetDistributionAccount(ctx sdk.Context) exported.ModuleAccountI {
|
2020-04-20 08:22:12 -07:00
|
|
|
return k.bankKeeper.GetModuleAccount(ctx, types.ModuleName)
|
2019-06-28 13:11:27 -07:00
|
|
|
}
|