Documentation ¶
Index ¶
- func NewQuerier(k Keeper) sdk.Querier
- func ValidateOriginalMintedPerBlock(originalMintedPerBlock sdk.Dec) error
- type Keeper
- func (k Keeper) AddCollectedFees(ctx sdk.Context, fees sdk.Coins) error
- func (k Keeper) AddYieldFarming(ctx sdk.Context, yieldAmt sdk.Coins) error
- func (k Keeper) AfterDepositPeriodPassed(_ sdk.Context, _ govTypes.Proposal)
- func (k Keeper) AfterSubmitProposalHandler(_ sdk.Context, _ govTypes.Proposal)
- func (k Keeper) AllocateTokenToTreasure(ctx sdk.Context, fees sdk.Coins) (remain sdk.Coins, err error)
- func (k Keeper) BondedRatio(ctx sdk.Context) sdk.Dec
- func (k Keeper) CheckMsgSubmitProposal(ctx sdk.Context, msg govTypes.MsgSubmitProposal) sdk.Error
- func (k Keeper) DeleteTreasures(ctx sdk.Context, treasures []types.Treasure) error
- func (k Keeper) GetInflation(ctx sdk.Context, minter *types.MinterCustom, params types.Params) sdk.Dec
- func (k Keeper) GetMaxDepositPeriod(ctx sdk.Context, content sdkGov.Content) (maxDepositPeriod time.Duration)
- func (k Keeper) GetMinDeposit(ctx sdk.Context, content sdkGov.Content) (minDeposit sdk.SysCoins)
- func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter)
- func (k Keeper) GetMinterCustom(ctx sdk.Context) (minter types.MinterCustom)
- func (k Keeper) GetOriginalMintedPerBlock() sdk.Dec
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetTreasures(ctx sdk.Context) (treasures []types.Treasure)
- func (k Keeper) GetVotingPeriod(ctx sdk.Context, content sdkGov.Content) (votingPeriod time.Duration)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintCoins(ctx sdk.Context, newCoins sdk.Coins) error
- func (k Keeper) RejectedHandler(_ sdk.Context, _ govTypes.Content)
- func (k *Keeper) SetGovKeeper(gk types.GovKeeper)
- func (k Keeper) SetMinter(ctx sdk.Context, minter types.MinterCustom)
- func (k Keeper) SetMinterCustom(ctx sdk.Context, minter types.MinterCustom)
- func (k Keeper) SetOriginalMintedPerBlock(originalMintedPerBlock sdk.Dec)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetTreasures(ctx sdk.Context, treasures []types.Treasure)
- func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdk.Dec
- func (k Keeper) UpdateMinterCustom(ctx sdk.Context, minter *types.MinterCustom, params types.Params)
- func (k Keeper) UpdateTreasures(ctx sdk.Context, treasures []types.Treasure) error
- func (k Keeper) VoteHandler(_ sdk.Context, _ govTypes.Proposal, _ govTypes.Vote) (string, sdk.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier returns a minting Querier handler.
func ValidateOriginalMintedPerBlock ¶
ValidateMinterCustom validate minter
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the mint store
func NewKeeper ¶
func NewKeeper( cdc *codec.Codec, key sdk.StoreKey, paramSpace params.Subspace, sk types.StakingKeeper, supplyKeeper types.SupplyKeeper, feeCollectorName, farmModule string, ) Keeper
NewKeeper creates a new mint Keeper instance
func (Keeper) AddCollectedFees ¶
AddCollectedFees implements an alias call to the underlying supply keeper's AddCollectedFees to be used in BeginBlocker.
func (Keeper) AddYieldFarming ¶
func (Keeper) AfterDepositPeriodPassed ¶ added in v1.1.8
func (Keeper) AfterSubmitProposalHandler ¶ added in v1.1.8
nolint
func (Keeper) AllocateTokenToTreasure ¶ added in v1.1.8
func (k Keeper) AllocateTokenToTreasure(ctx sdk.Context, fees sdk.Coins) (remain sdk.Coins, err error)
AllocateTokenToTreasure allocate token to treasure and return remain
func (Keeper) BondedRatio ¶
BondedRatio implements an alias call to the underlying staking keeper's BondedRatio to be used in BeginBlocker.
func (Keeper) CheckMsgSubmitProposal ¶ added in v1.1.8
CheckMsgSubmitProposal validates MsgSubmitProposal
func (Keeper) DeleteTreasures ¶ added in v1.1.8
func (Keeper) GetInflation ¶ added in v1.7.0
func (k Keeper) GetInflation(ctx sdk.Context, minter *types.MinterCustom, params types.Params) sdk.Dec
GetInflation returns the inflation of the current state of OKC, and the calculation of inflation can be found at https://github.com/okex/oec/issues/1628.
func (Keeper) GetMaxDepositPeriod ¶ added in v1.1.8
func (k Keeper) GetMaxDepositPeriod(ctx sdk.Context, content sdkGov.Content) (maxDepositPeriod time.Duration)
GetMaxDepositPeriod returns max deposit period
func (Keeper) GetMinDeposit ¶ added in v1.1.8
GetMinDeposit returns min deposit
func (Keeper) GetMinterCustom ¶
func (k Keeper) GetMinterCustom(ctx sdk.Context) (minter types.MinterCustom)
get the minter custom
func (Keeper) GetOriginalMintedPerBlock ¶
GetOriginalMintedPerBlock returns the init tokens per block.
func (Keeper) GetTreasures ¶ added in v1.1.8
GetTreasures get the treasures from db
func (Keeper) GetVotingPeriod ¶ added in v1.1.8
func (k Keeper) GetVotingPeriod(ctx sdk.Context, content sdkGov.Content) (votingPeriod time.Duration)
GetVotingPeriod returns voting period
func (Keeper) MintCoins ¶
MintCoins implements an alias call to the underlying supply keeper's MintCoins to be used in BeginBlocker.
func (Keeper) RejectedHandler ¶ added in v1.1.8
func (*Keeper) SetGovKeeper ¶ added in v1.1.8
SetGovKeeper sets keeper of gov
func (Keeper) SetMinter ¶
func (k Keeper) SetMinter(ctx sdk.Context, minter types.MinterCustom)
set the minter
func (Keeper) SetMinterCustom ¶
func (k Keeper) SetMinterCustom(ctx sdk.Context, minter types.MinterCustom)
set the minter custom
func (Keeper) SetOriginalMintedPerBlock ¶
SetOriginalMintedPerBlock sets the init tokens per block.
func (Keeper) SetTreasures ¶ added in v1.1.8
SetTreasures set the treasures to db
func (Keeper) StakingTokenSupply ¶
StakingTokenSupply implements an alias call to the underlying staking keeper's StakingTokenSupply to be used in BeginBlocker.