keeper

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidatorCount = 10

	ValidatorSettlementIndex = ValidatorCount
	ReserveIndex             = ValidatorCount + 1
	TempIndex                = ValidatorCount + 2

	TotalCount = TempIndex + 1
)

Variables

ModuleBasics nolint

Functions

func MakeEncodingConfig

func MakeEncodingConfig(_ *testing.T) simparams.EncodingConfig

MakeEncodingConfig nolint

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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 (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

func (Keeper) FundFeeCollector

func (k Keeper) FundFeeCollector(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error

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) GetBlocksPerYear

func (k Keeper) GetBlocksPerYear(ctx sdk.Context) uint64

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

func (Keeper) GetReserveAccount

func (k Keeper) GetReserveAccount(ctx sdk.Context) (reserveAccount string)

func (Keeper) GetRewardAccount

func (k Keeper) GetRewardAccount(ctx sdk.Context) authtypes.ModuleAccountI

GetRewardAccount returns the reward ModuleAccount

func (Keeper) GetRewardDistributeAccount

func (k Keeper) GetRewardDistributeAccount(ctx sdk.Context) (rewardDistributeAccount string)

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) Params

Params queries params of distribution module

func (Keeper) Pool

RewardPool queries the community pool coins

func (Keeper) PoolBalances

func (k Keeper) PoolBalances(ctx sdk.Context) sdk.Coins

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

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 CreateTestInput

func CreateTestInput(t *testing.T) TestInput

CreateTestInput nolint

func (*TestInput) InitAccountWithCoins

func (ti *TestInput) InitAccountWithCoins(addr sdk.AccAddress, coins sdk.Coins) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL