keeper

package
v3.46.13-integrate-alp... Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

NewQuerier returns a minting Querier handler.

Types

type Keeper

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

Keeper of the mint store

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace,
	sk types.StakingKeeper, ak types.AccountKeeper, bk types.BankKeeper, dk types.DistrKeeper,
	feeCollectorName string,
) Keeper

NewKeeper creates a new mint Keeper instance

func (Keeper) AllocateAllBalanceToCommunity

func (k Keeper) AllocateAllBalanceToCommunity(ctx sdk.Context) error

AllocateAllBalanceToCommunity allocates all remaining balance for the Community Pool.

func (Keeper) AllocateCollectedFees

func (k Keeper) AllocateCollectedFees(ctx sdk.Context, fees sdk.Coins) error

AllocateCollectedFees implements an alias call to the underlying supply keeper's AllocateCollectedFees to be used in BeginBlocker.

func (Keeper) AllocateFoundation

func (k Keeper) AllocateFoundation(ctx sdk.Context, amount sdk.Coins) error

AllocateFoundation allocates tokens to the Foundation Address.

func (Keeper) AllocateInflation

func (k Keeper) AllocateInflation(ctx sdk.Context, mintedCoin sdk.Coin) error

AllocateInflation allocates coins from the inflation to external modules according to allocation proportions:

  • staking rewards -> sdk `auth` module fee collector
  • foundation -> a multi-sig address of the Astra Foundation
  • community pool -> sdk `dist` module community pool

func (Keeper) AnnualProvisions

AnnualProvisions returns minter.AnnualProvisions of the mint module.

func (Keeper) BlockProvision

BlockProvision returns current block provisions.

func (Keeper) BondedRatio

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

BondedRatio implements an alias call to the underlying staking keeper's BondedRatio to be used in BeginBlocker.

func (Keeper) CirculatingSupply

CirculatingSupply returns the total supply in circulation excluding the team allocation in the first year.

func (Keeper) GetBondedRatio

GetBondedRatio returns current bonded ratio.

func (Keeper) GetMinter

func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter)

GetMinter returns the current Minter.

func (Keeper) GetParams

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

GetParams returns the total set of minting parameters.

func (Keeper) GetProportions

func (k Keeper) GetProportions(
	_ sdk.Context,
	coin sdk.Coin,
	distribution sdk.Dec,
) sdk.Coin

GetProportions returns the amount of coins given its distribution and the total amount of coins.

func (Keeper) GetTotalMintProvision

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

GetTotalMintProvision returns the total amount of minted provision via block rewards. The returned amount is measured in config.BaseDenom (i.e, aastra).

func (Keeper) Inflation

Inflation returns minter.Inflation of the mint module.

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) MintAndAllocateInflation

func (k Keeper) MintAndAllocateInflation(ctx sdk.Context, coin sdk.Coin) error

MintAndAllocateInflation performs inflation minting and allocation

func (Keeper) MintCoins

func (k Keeper) MintCoins(ctx sdk.Context, newCoin sdk.Coin) error

MintCoins implements an alias call to the underlying supply keeper's MintCoins to be used in BeginBlocker.

func (Keeper) Params

Params returns params of the mint module.

func (Keeper) SetMinter

func (k Keeper) SetMinter(ctx sdk.Context, minter types.Minter)

SetMinter sets `minter` as the newest Minter.

func (Keeper) SetParams

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

SetParams sets the total set of minting parameters.

func (Keeper) SetTotalMintProvision

func (k Keeper) SetTotalMintProvision(ctx sdk.Context, totalMintedProvision sdk.Dec)

SetTotalMintProvision sets the current TotalMintedProvision. totalMintedProvision must be converted to config.BaseDenom (i.e, aastra).

func (Keeper) StakingTokenSupply

func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdk.Int

StakingTokenSupply implements an alias call to the underlying staking keeper's StakingTokenSupply to be used in BeginBlocker.

func (Keeper) TotalMintedProvision

TotalMintedProvision returns the total amount of provisions minted via block rewards.

Jump to

Keyboard shortcuts

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