keeper

package
v8.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	paramSpace paramtypes.Subspace,
	accountKeeper cellarfeestypes.AccountKeeper,
	bankKeeper cellarfeestypes.BankKeeper,
	mintKeeper cellarfeestypes.MintKeeper,
	corkKeeper cellarfeestypes.CorkKeeper,
	auctionKeeper cellarfeestypes.AuctionKeeper,
) Keeper

func (Keeper) BeginBlocker

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

BeginBlocker emits rewards each block they are available by sending them to the distribution module's fee collector account. Emissions are a constant value based on the last peak supply of distributable fees so that the reward supply will decrease linearly until exhausted.

func (Keeper) EndBlocker

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

EndBlocker is called at the end of every block

func (Keeper) ExportGenesis

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

ExportGenesis returns the module's exported genesis.

func (Keeper) GetAPY

func (k Keeper) GetAPY(ctx sdk.Context) sdk.Dec

func (Keeper) GetBalanceUsdValue

func (k Keeper) GetBalanceUsdValue(ctx sdk.Context, balance sdk.Coin, tokenPrice auctiontypes.TokenPrice) sdk.Dec

func (Keeper) GetEmission

func (k Keeper) GetEmission(ctx sdk.Context, remainingRewardsSupply math.Int) sdk.Coins

func (Keeper) GetFeeBalance

func (k Keeper) GetFeeBalance(ctx sdk.Context, denom string) (sdk.Coin, bool)

func (Keeper) GetFeesAccount

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

Getter for module account that holds the fee pool funds

func (Keeper) GetLastRewardSupplyPeak

func (k Keeper) GetLastRewardSupplyPeak(ctx sdk.Context) math.Int

func (Keeper) GetParamSetIfExists

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

func (Keeper) GetParams

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

func (Keeper) InitGenesis

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

InitGenesis initializes the module's state from a provided genesis state.

func (Keeper) Logger

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

func (Keeper) QueryAPY

func (Keeper) QueryParams

func (Keeper) SetLastRewardSupplyPeak

func (k Keeper) SetLastRewardSupplyPeak(ctx sdk.Context, amount math.Int)

func (Keeper) SetParams

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

type Migrator

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

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper, legacySubspace paramtypes.Subspace) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2

func (m Migrator) Migrate1to2(ctx sdk.Context) error

Migrate1to2 migrates from consensus version 1 to 2.

Jump to

Keyboard shortcuts

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