Documentation ¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) BurnAndDistribute(ctx sdk.Context)
- func (k Keeper) FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetTotalBurnedNeutronsAmount(ctx sdk.Context) types.TotalBurnedNeutronsAmount
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RecordBurnedFees(ctx sdk.Context, amount sdk.Coin)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) TotalBurnedNeutronsAmount(goCtx context.Context, _ *types.QueryTotalBurnedNeutronsAmountRequest) (*types.QueryTotalBurnedNeutronsAmountResponse, error)
- func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
Constants ¶
This section is empty.
Variables ¶
var KeyBurnedFees = []byte("BurnedFees")
Functions ¶
func NewMsgServerImpl ¶
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 ¶
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/v3/blob/v0.2.0/x/ccv/consumer/keeper/distribution.go#L17) 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 ¶
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 (Keeper) GetTotalBurnedNeutronsAmount ¶
func (k Keeper) GetTotalBurnedNeutronsAmount(ctx sdk.Context) types.TotalBurnedNeutronsAmount
GetTotalBurnedNeutronsAmount gets the total burned amount of NTRN tokens
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RecordBurnedFees ¶
RecordBurnedFees adds `amount` to the total amount of burned NTRN tokens
func (Keeper) TotalBurnedNeutronsAmount ¶
func (k Keeper) TotalBurnedNeutronsAmount(goCtx context.Context, _ *types.QueryTotalBurnedNeutronsAmountRequest) (*types.QueryTotalBurnedNeutronsAmountResponse, error)
func (Keeper) UpdateParams ¶
func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
UpdateParams updates the module parameters