keeper

package
v0.15.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MinLockupDuration defines the lockup minimum time
	// TODO(mercilex): maybe module param
	MinLockupDuration = 24 * time.Hour
	// MinEpochs defines the minimum number of epochs
	// TODO(mercilex): maybe module param
	MinEpochs int64 = 7
)
View Source
const (
	// FundsModuleAccountAddressPrefix defines the prefix
	// of module accounts created that contain an
	// incentivization program funds.
	FundsModuleAccountAddressPrefix = "incentivization_escrow_"
)
View Source
const (
	IncentivizationProgramStartID uint64 = 0
)

Variables

This section is empty.

Functions

func NewEscrowAccountName

func NewEscrowAccountName(id uint64) string

NewEscrowAccountName returns the escrow module account name

func NewMsgServer

func NewMsgServer(k Keeper) types.MsgServer

func NewQueryServer

func NewQueryServer(k Keeper) types.QueryServer

Types

type IncentivizationProgramState

type IncentivizationProgramState struct {
	// contains filtered or unexported fields
}

func (IncentivizationProgramState) Create

func (IncentivizationProgramState) Get

func (IncentivizationProgramState) IteratePrograms added in v0.2.5

func (s IncentivizationProgramState) IteratePrograms(do func(program *types.IncentivizationProgram) (stop bool))

IteratePrograms iterates over every program

func (IncentivizationProgramState) PeekNextID

func (s IncentivizationProgramState) PeekNextID() uint64

PeekNextID returns the next ID without actually increasing the counter.

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func (Keeper) CreateIncentivizationProgram

func (k Keeper) CreateIncentivizationProgram(
	ctx sdk.Context,
	lpDenom string, minLockupDuration time.Duration, startTime time.Time, epochs int64) (*types.IncentivizationProgram, error)

func (Keeper) Distribute

func (k Keeper) Distribute(ctx sdk.Context) error

Distribute distributes incentivization rewards to accounts that meet incentivization program criteria.

func (Keeper) FundIncentivizationProgram

func (k Keeper) FundIncentivizationProgram(ctx sdk.Context, id uint64, funder sdk.AccAddress, funds sdk.Coins) error

func (Keeper) IncentivizationProgramsState

func (k Keeper) IncentivizationProgramsState(ctx sdk.Context) IncentivizationProgramState

Jump to

Keyboard shortcuts

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