keeper

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitBurnAmountCreatedEvent

func EmitBurnAmountCreatedEvent(ctx sdk.Context, burnAmount *types.BurnAmount)

func EmitEpochBurnEvent

func EmitEpochBurnEvent(ctx sdk.Context, epochIdentifier string, epochNumber int64, burnAmount *types.BurnAmount, burnt sdk.Coin)

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Hooks

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

Hooks is the wrapper struct for the incentives keeper.

func (Hooks) AfterEpochEnd

func (h Hooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)

AfterEpochEnd is the epoch end hook.

func (Hooks) BeforeEpochStart

func (h Hooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)

BeforeEpochStart is the epoch start hook.

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,

	bankKeeper types.BankKeeper,
	epochsKeeper types.EpochsKeeper,
) *Keeper

func (Keeper) AddRegistrationFeeToBurnAmounts

func (k Keeper) AddRegistrationFeeToBurnAmounts(ctx sdk.Context, registrationPeriodInYear uint64, amount sdk.Coin) (burnAmounts []types.BurnAmount, err error)

Add registration fee to burnAmounts

func (Keeper) AddToTotalBurnAmount

func (k Keeper) AddToTotalBurnAmount(ctx sdk.Context, index uint64, amount sdk.Coin) (newBurnAmount types.BurnAmount)

Add to total burn BurnAmount

func (Keeper) AfterEpochEnd

func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)

AfterEpochEnd is the epoch end hook.

func (Keeper) BeforeEpochStart

func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)

BeforeEpochStart is the epoch start hook.

func (Keeper) GetAllBurnAmount

func (k Keeper) GetAllBurnAmount(ctx sdk.Context) (list []types.BurnAmount)

GetAllBurnAmount returns all burnAmount

func (Keeper) GetBurnAmount

func (k Keeper) GetBurnAmount(
	ctx sdk.Context,
	index uint64,
) (val types.BurnAmount, found bool)

GetBurnAmount returns a burnAmount from its index

func (Keeper) GetEpochBurnConfig

func (k Keeper) GetEpochBurnConfig(ctx sdk.Context) (val types.EpochBurnConfig, found bool)

GetEpochBurnConfig returns epochBurnConfig

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Hooks returns the hook wrapper struct.

func (Keeper) Logger

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

func (Keeper) NewBurnAmount

func (k Keeper) NewBurnAmount(ctx sdk.Context, config types.EpochBurnConfig, index uint64) (burnAmount types.BurnAmount)

Create a next burnAmount

func (Keeper) Params

func (Keeper) RemoveBurnAmount

func (k Keeper) RemoveBurnAmount(
	ctx sdk.Context,
	index uint64,
)

RemoveBurnAmount removes a burnAmount from the store

func (Keeper) RemoveEpochBurnConfig

func (k Keeper) RemoveEpochBurnConfig(ctx sdk.Context)

RemoveEpochBurnConfig removes epochBurnConfig from the store

func (Keeper) SetBurnAmount

func (k Keeper) SetBurnAmount(ctx sdk.Context, burnAmount types.BurnAmount)

SetBurnAmount set a specific burnAmount in the store from its index

func (Keeper) SetEpochBurnConfig

func (k Keeper) SetEpochBurnConfig(ctx sdk.Context, epochBurnConfig types.EpochBurnConfig)

SetEpochBurnConfig set epochBurnConfig in the store

func (Keeper) SetParams

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

SetParams set the params

Jump to

Keyboard shortcuts

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