Documentation ¶
Index ¶
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) AllocateAllBalanceToCommunity(ctx sdk.Context) error
- func (k Keeper) AllocateCollectedFees(ctx sdk.Context, fees sdk.Coins) error
- func (k Keeper) AllocateFoundation(ctx sdk.Context, amount sdk.Coins) error
- func (k Keeper) AllocateInflation(ctx sdk.Context, mintedCoin sdk.Coin) error
- func (k Keeper) AnnualProvisions(c context.Context, _ *types.QueryAnnualProvisionsRequest) (*types.QueryAnnualProvisionsResponse, error)
- func (k Keeper) BlockProvision(c context.Context, _ *types.QueryBlockProvisionRequest) (*types.QueryBlockProvisionResponse, error)
- func (k Keeper) BondedRatio(ctx sdk.Context) sdk.Dec
- func (k Keeper) CirculatingSupply(c context.Context, _ *types.QueryCirculatingSupplyRequest) (*types.QueryCirculatingSupplyResponse, error)
- func (k Keeper) GetBondedRatio(c context.Context, _ *types.QueryBondedRatioRequest) (*types.QueryBondedRatioResponse, error)
- func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetProportions(_ sdk.Context, coin sdk.Coin, distribution sdk.Dec) sdk.Coin
- func (k Keeper) GetTotalMintProvision(ctx sdk.Context) sdk.Dec
- func (k Keeper) Inflation(c context.Context, _ *types.QueryInflationRequest) (*types.QueryInflationResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintAndAllocateInflation(ctx sdk.Context, coin sdk.Coin) error
- func (k Keeper) MintCoins(ctx sdk.Context, newCoin sdk.Coin) error
- func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetMinter(ctx sdk.Context, minter types.Minter)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetTotalMintProvision(ctx sdk.Context, totalMintedProvision sdk.Dec)
- func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdk.Int
- func (k Keeper) TotalMintedProvision(c context.Context, _ *types.QueryTotalMintedProvisionRequest) (*types.QueryTotalMintedProvisionResponse, error)
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 ¶
AllocateAllBalanceToCommunity allocates all remaining balance for the Community Pool.
func (Keeper) AllocateCollectedFees ¶
AllocateCollectedFees implements an alias call to the underlying supply keeper's AllocateCollectedFees to be used in BeginBlocker.
func (Keeper) AllocateFoundation ¶
AllocateFoundation allocates tokens to the Foundation Address.
func (Keeper) AllocateInflation ¶
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 ¶
func (k Keeper) AnnualProvisions(c context.Context, _ *types.QueryAnnualProvisionsRequest) (*types.QueryAnnualProvisionsResponse, error)
AnnualProvisions returns minter.AnnualProvisions of the mint module.
func (Keeper) BlockProvision ¶
func (k Keeper) BlockProvision( c context.Context, _ *types.QueryBlockProvisionRequest, ) (*types.QueryBlockProvisionResponse, error)
BlockProvision returns current block provisions.
func (Keeper) BondedRatio ¶
BondedRatio implements an alias call to the underlying staking keeper's BondedRatio to be used in BeginBlocker.
func (Keeper) CirculatingSupply ¶
func (k Keeper) CirculatingSupply( c context.Context, _ *types.QueryCirculatingSupplyRequest, ) (*types.QueryCirculatingSupplyResponse, error)
CirculatingSupply returns the total supply in circulation excluding the team allocation in the first year.
func (Keeper) GetBondedRatio ¶
func (k Keeper) GetBondedRatio( c context.Context, _ *types.QueryBondedRatioRequest, ) (*types.QueryBondedRatioResponse, error)
GetBondedRatio returns current bonded ratio.
func (Keeper) GetProportions ¶
GetProportions returns the amount of coins given its distribution and the total amount of coins.
func (Keeper) GetTotalMintProvision ¶
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 ¶
func (k Keeper) Inflation(c context.Context, _ *types.QueryInflationRequest) (*types.QueryInflationResponse, error)
Inflation returns minter.Inflation of the mint module.
func (Keeper) MintAndAllocateInflation ¶
MintAndAllocateInflation performs inflation minting and allocation
func (Keeper) MintCoins ¶
MintCoins implements an alias call to the underlying supply keeper's MintCoins to be used in BeginBlocker.
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params returns params of the mint module.
func (Keeper) SetTotalMintProvision ¶
SetTotalMintProvision sets the current TotalMintedProvision. totalMintedProvision must be converted to config.BaseDenom (i.e, aastra).
func (Keeper) StakingTokenSupply ¶
StakingTokenSupply implements an alias call to the underlying staking keeper's StakingTokenSupply to be used in BeginBlocker.
func (Keeper) TotalMintedProvision ¶
func (k Keeper) TotalMintedProvision( c context.Context, _ *types.QueryTotalMintedProvisionRequest, ) (*types.QueryTotalMintedProvisionResponse, error)
TotalMintedProvision returns the total amount of provisions minted via block rewards.