keeper

package
v7.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hooks

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

func (Hooks) AfterBatchExecutedEvent

func (h Hooks) AfterBatchExecutedEvent(ctx sdk.Context, event gravitytypes.BatchExecutedEvent)

func (Hooks) AfterContractCallExecutedEvent

func (h Hooks) AfterContractCallExecutedEvent(ctx sdk.Context, event gravitytypes.ContractCallExecutedEvent)

func (Hooks) AfterERC20DeployedEvent

func (h Hooks) AfterERC20DeployedEvent(ctx sdk.Context, event gravitytypes.ERC20DeployedEvent)

func (Hooks) AfterSendToCosmosEvent

func (h Hooks) AfterSendToCosmosEvent(ctx sdk.Context, event gravitytypes.SendToCosmosEvent)

Each time we receive a fee accrual from a cellar, we increment a counter for the respective denom. If a counter reaches a threshold defined in the cellarfees params, we attempt to start an auction. If the auction is started successfully we reset the count for that denom.

func (Hooks) AfterSignerSetExecutedEvent

func (h Hooks) AfterSignerSetExecutedEvent(ctx sdk.Context, event gravitytypes.SignerSetTxExecutedEvent)

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	paramSpace paramtypes.Subspace,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	mintKeeper types.MintKeeper,
	corkKeeper types.CorkKeeper,
	gravityKeeper types.GravityKeeper,
	auctionKeeper types.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) GetEmission

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

func (Keeper) GetFeeAccrualCounters

func (k Keeper) GetFeeAccrualCounters(ctx sdk.Context) (counters types.FeeAccrualCounters)

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

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

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Hooks Return the wrapper struct

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

func (k Keeper) SetFeeAccrualCounters(ctx sdk.Context, counters types.FeeAccrualCounters)

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)

Jump to

Keyboard shortcuts

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