keeper

package
v3.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeyBurnedFees = []byte("BurnedFees")

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	authority string,
) *Keeper

func (Keeper) BurnAndDistribute

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

BurnAndDistribute is an important part of tokenomics. It does few things: 1. Burns NTRN fee coins distributed to consumertypes.ConsumerRedistributeName in ICS (https://github.com/cosmos/interchain-security/blob/86046926502f7b0ba795bebcdd1fdc97ac776573/x/ccv/consumer/keeper/distribution.go#L67) 2. Updates total amount of burned NTRN coins 3. Sends non-NTRN fee tokens to reserve contract address Panics if no `consumertypes.ConsumerRedistributeName` module found OR could not burn NTRN tokens

func (Keeper) FundCommunityPool

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

FundCommunityPool is method to satisfy DistributionKeeper interface for packet-forward-middleware Keeper. The original method sends coins to a community pool of a chain. The current method sends coins to a Fee Collector module which collects fee on consumer chain.

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetTotalBurnedNeutronsAmount

func (k Keeper) GetTotalBurnedNeutronsAmount(ctx sdk.Context) types.TotalBurnedNeutronsAmount

GetTotalBurnedNeutronsAmount gets the total burned amount of NTRN tokens

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RecordBurnedFees

func (k Keeper) RecordBurnedFees(ctx sdk.Context, amount sdk.Coin)

RecordBurnedFees adds `amount` to the total amount of burned NTRN tokens

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) UpdateParams

UpdateParams updates the module parameters

Jump to

Keyboard shortcuts

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