Documentation ¶
Index ¶
- Constants
- Variables
- func MakeEncodingConfig(_ *testing.T) simparams.EncodingConfig
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey cryptotypes.PubKey, amt sdk.Int) *stakingtypes.MsgCreateValidator
- func NewTestMsgDelegate(delegatorAddress sdk.AccAddress, validatorAddress sdk.ValAddress, amt sdk.Int) *stakingtypes.MsgDelegate
- type Keeper
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) FundFeeCollector(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
- func (k Keeper) GetBlocksPerYear(ctx sdk.Context) uint64
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetReserveAccount(ctx sdk.Context) (reserveAccount string)
- func (k Keeper) GetRewardAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetRewardDistributeAccount(ctx sdk.Context) (rewardDistributeAccount string)
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Pool(c context.Context, req *types.QueryPoolRequest) (*types.QueryPoolResponse, error)
- func (k Keeper) PoolBalances(ctx sdk.Context) sdk.Coins
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- type TestInput
Constants ¶
View Source
const ( ValidatorCount = 10 ValidatorSettlementIndex = ValidatorCount ReserveIndex = ValidatorCount + 1 TempIndex = ValidatorCount + 2 TotalCount = TempIndex + 1 )
Variables ¶
View Source
var ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, bank.AppModuleBasic{}, distr.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, params.AppModuleBasic{}, )
ModuleBasics nolint
View Source
var (
Pks = simapp.CreateTestPubKeys(TotalCount)
)
Functions ¶
func MakeEncodingConfig ¶
func MakeEncodingConfig(_ *testing.T) simparams.EncodingConfig
MakeEncodingConfig nolint
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the reward MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
func NewTestMsgCreateValidator ¶
func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey cryptotypes.PubKey, amt sdk.Int) *stakingtypes.MsgCreateValidator
NewTestMsgCreateValidator test msg creator
func NewTestMsgDelegate ¶
func NewTestMsgDelegate(delegatorAddress sdk.AccAddress, validatorAddress sdk.ValAddress, amt sdk.Int) *stakingtypes.MsgDelegate
NewTestMsgDelegate test msg creator
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper, dk types.DistributionKeeper, mk types.MintKeeper, ) Keeper
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
func (Keeper) FundFeeCollector ¶
FundFeeCollector allows an account to directly fund the fee collector fund. The amount is added to the fee collector account An error is returned if the amount cannot be sent to the module account.
func (Keeper) GetReserveAccount ¶
func (Keeper) GetRewardAccount ¶
func (k Keeper) GetRewardAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetRewardAccount returns the reward ModuleAccount
func (Keeper) GetRewardDistributeAccount ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries params of distribution module
func (Keeper) Pool ¶
func (k Keeper) Pool(c context.Context, req *types.QueryPoolRequest) (*types.QueryPoolResponse, error)
RewardPool queries the community pool coins
type TestInput ¶
type TestInput struct { Ctx sdk.Context Cdc *codec.LegacyAmino AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper RewardKeeper Keeper StakingKeeper stakingkeeper.Keeper DistrKeeper distrkeeper.Keeper }
TestInput nolint
func (*TestInput) InitAccountWithCoins ¶
Click to show internal directories.
Click to hide internal directories.