Documentation ¶
Index ¶
- type Hooks
- func (h Hooks) AfterBatchExecutedEvent(ctx sdk.Context, event gravitytypes.BatchExecutedEvent)
- func (h Hooks) AfterContractCallExecutedEvent(ctx sdk.Context, event gravitytypes.ContractCallExecutedEvent)
- func (h Hooks) AfterERC20DeployedEvent(ctx sdk.Context, event gravitytypes.ERC20DeployedEvent)
- func (h Hooks) AfterSendToCosmosEvent(ctx sdk.Context, event gravitytypes.SendToCosmosEvent)
- func (h Hooks) AfterSignerSetExecutedEvent(ctx sdk.Context, event gravitytypes.SignerSetTxExecutedEvent)
- type Keeper
- func (k Keeper) BeginBlocker(ctx sdk.Context)
- func (k Keeper) EndBlocker(ctx sdk.Context)
- func (k Keeper) ExportGenesis(ctx sdk.Context) types.GenesisState
- func (k Keeper) GetAPY(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetEmission(ctx sdk.Context, remainingRewardsSupply math.Int) sdk.Coins
- func (k Keeper) GetFeeAccrualCounters(ctx sdk.Context) (counters types.FeeAccrualCounters)
- func (k Keeper) GetFeesAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetLastRewardSupplyPeak(ctx sdk.Context) math.Int
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) QueryAPY(c context.Context, _ *types.QueryAPYRequest) (*types.QueryAPYResponse, error)
- func (k Keeper) QueryFeeAccrualCounters(c context.Context, req *types.QueryFeeAccrualCountersRequest) (*types.QueryFeeAccrualCountersResponse, error)
- func (k Keeper) QueryLastRewardSupplyPeak(c context.Context, req *types.QueryLastRewardSupplyPeakRequest) (*types.QueryLastRewardSupplyPeakResponse, error)
- func (k Keeper) QueryModuleAccounts(c context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error)
- func (k Keeper) QueryParams(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetFeeAccrualCounters(ctx sdk.Context, counters types.FeeAccrualCounters)
- func (k Keeper) SetLastRewardSupplyPeak(ctx sdk.Context, amount math.Int)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
func (Hooks) AfterBatchExecutedEvent ¶
func (h Hooks) AfterBatchExecutedEvent(ctx sdk.Context, event gravitytypes.BatchExecutedEvent)
func (Hooks) AfterContractCallExecutedEvent ¶
func (h Hooks) AfterContractCallExecutedEvent(ctx sdk.Context, event gravitytypes.ContractCallExecutedEvent)
func (Hooks) AfterERC20DeployedEvent ¶
func (h Hooks) AfterERC20DeployedEvent(ctx sdk.Context, event gravitytypes.ERC20DeployedEvent)
func (Hooks) AfterSendToCosmosEvent ¶
func (h Hooks) AfterSendToCosmosEvent(ctx sdk.Context, event gravitytypes.SendToCosmosEvent)
Each time we receive a fee accrual from a cellar, we increment a counter for the respective denom. If a counter reaches a threshold defined in the cellarfees params, we attempt to start an auction. If the auction is started successfully we reset the count for that denom.
func (Hooks) AfterSignerSetExecutedEvent ¶
func (h Hooks) AfterSignerSetExecutedEvent(ctx sdk.Context, event gravitytypes.SignerSetTxExecutedEvent)
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, mintKeeper types.MintKeeper, corkKeeper types.CorkKeeper, gravityKeeper types.GravityKeeper, auctionKeeper types.AuctionKeeper, ) Keeper
func (Keeper) BeginBlocker ¶
BeginBlocker emits rewards each block they are available by sending them to the distribution module's fee collector account. Emissions are a constant value based on the last peak supply of distributable fees so that the reward supply will decrease linearly until exhausted.
func (Keeper) EndBlocker ¶
EndBlocker is called at the end of every block
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) types.GenesisState
ExportGenesis returns the module's exported genesis.
func (Keeper) GetEmission ¶
func (Keeper) GetFeeAccrualCounters ¶
func (k Keeper) GetFeeAccrualCounters(ctx sdk.Context) (counters types.FeeAccrualCounters)
func (Keeper) GetFeesAccount ¶
func (k Keeper) GetFeesAccount(ctx sdk.Context) authtypes.ModuleAccountI
Getter for module account that holds the fee pool funds
func (Keeper) GetLastRewardSupplyPeak ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState)
InitGenesis initializes the module's state from a provided genesis state.
func (Keeper) QueryAPY ¶
func (k Keeper) QueryAPY(c context.Context, _ *types.QueryAPYRequest) (*types.QueryAPYResponse, error)
func (Keeper) QueryFeeAccrualCounters ¶
func (k Keeper) QueryFeeAccrualCounters(c context.Context, req *types.QueryFeeAccrualCountersRequest) (*types.QueryFeeAccrualCountersResponse, error)
func (Keeper) QueryLastRewardSupplyPeak ¶
func (k Keeper) QueryLastRewardSupplyPeak(c context.Context, req *types.QueryLastRewardSupplyPeakRequest) (*types.QueryLastRewardSupplyPeakResponse, error)
func (Keeper) QueryModuleAccounts ¶
func (k Keeper) QueryModuleAccounts(c context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error)
func (Keeper) QueryParams ¶
func (k Keeper) QueryParams(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetFeeAccrualCounters ¶
func (k Keeper) SetFeeAccrualCounters(ctx sdk.Context, counters types.FeeAccrualCounters)