Documentation ¶
Index ¶
- func NewMsgServer(k *Keeper) types.MsgServer
- func NewQueryServer(keeper Keeper) types.QueryServer
- type Keeper
- func (k *Keeper) EndBlock(ctx sdk.Context) error
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) GetAuthority() string
- func (k *Keeper) GetBaseGasPrice(ctx sdk.Context) (math.LegacyDec, error)
- func (k *Keeper) GetEnabledHeight(ctx sdk.Context) (int64, error)
- func (k *Keeper) GetLearningRate(ctx sdk.Context) (math.LegacyDec, error)
- func (k *Keeper) GetMinGasPrice(ctx sdk.Context, denom string) (sdk.DecCoin, error)
- func (k *Keeper) GetMinGasPrices(ctx sdk.Context) (sdk.DecCoins, error)
- func (k *Keeper) GetParams(ctx sdk.Context) (types.Params, error)
- func (k *Keeper) GetState(ctx sdk.Context) (types.State, error)
- func (k *Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState)
- func (k *Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) ResolveToDenom(ctx sdk.Context, coin sdk.DecCoin, denom string) (sdk.DecCoin, error)
- func (k *Keeper) SetDenomResolver(resolver types.DenomResolver)
- func (k *Keeper) SetEnabledHeight(ctx sdk.Context, height int64)
- func (k *Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k *Keeper) SetState(ctx sdk.Context, state types.State) error
- func (k *Keeper) UpdateFeeMarket(ctx sdk.Context) error
- type MsgServer
- type QueryServer
- func (q QueryServer) GasPrice(goCtx context.Context, req *types.GasPriceRequest) (*types.GasPriceResponse, error)
- func (q QueryServer) GasPrices(goCtx context.Context, _ *types.GasPricesRequest) (*types.GasPricesResponse, error)
- func (q QueryServer) Params(goCtx context.Context, _ *types.ParamsRequest) (*types.ParamsResponse, error)
- func (q QueryServer) State(goCtx context.Context, _ *types.StateRequest) (*types.StateResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServer ¶
NewMsgServer returns the MsgServer implementation.
func NewQueryServer ¶
func NewQueryServer(keeper Keeper) types.QueryServer
NewQueryServer creates a new instance of the x/feemarket QueryServer type.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper is the x/feemarket keeper.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, authKeeper types.AccountKeeper, resolver types.DenomResolver, authority string, ) *Keeper
NewKeeper constructs a new feemarket keeper.
func (*Keeper) EndBlock ¶
EndBlock returns an endblocker for the x/feemarket module. The endblocker is responsible for updating the state of the fee market based on the AIMD learning rate adjustment algorithm.
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context.
func (*Keeper) GetAuthority ¶
GetAuthority returns the address that is capable of executing a MsgUpdateParams message.
func (*Keeper) GetBaseGasPrice ¶
GetBaseGasPrice returns the base fee from the fee market state.
func (*Keeper) GetEnabledHeight ¶ added in v1.1.0
GetEnabledHeight returns the height at which the feemarket was enabled.
func (*Keeper) GetLearningRate ¶
GetLearningRate returns the learning rate from the fee market state.
func (*Keeper) GetMinGasPrice ¶
GetMinGasPrice returns the mininum gas prices for given denom as sdk.DecCoins from the fee market state.
func (*Keeper) GetMinGasPrices ¶
GetMinGasPrices returns the mininum gas prices as sdk.DecCoins from the fee market state.
func (*Keeper) InitGenesis ¶
func (k *Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState)
InitGenesis initializes the feemarket module's state from a given genesis state.
func (*Keeper) ResolveToDenom ¶
func (k *Keeper) ResolveToDenom(ctx sdk.Context, coin sdk.DecCoin, denom string) (sdk.DecCoin, error)
ResolveToDenom converts the given coin to the given denomination.
func (*Keeper) SetDenomResolver ¶
func (k *Keeper) SetDenomResolver(resolver types.DenomResolver)
SetDenomResolver sets the keeper's denom resolver.
func (*Keeper) SetEnabledHeight ¶ added in v1.1.0
SetEnabledHeight sets the height at which the feemarket was enabled.
func (*Keeper) UpdateFeeMarket ¶
UpdateFeeMarket updates the base fee and learning rate based on the AIMD learning rate adjustment algorithm. Note that if the fee market is disabled, this function will return without updating the fee market. This is executed in EndBlock which allows the next block's base fee to be readily available for wallets to estimate gas prices.
type MsgServer ¶
type MsgServer struct {
// contains filtered or unexported fields
}
MsgServer is the server API for x/feemarket Msg service.
type QueryServer ¶
type QueryServer struct {
// contains filtered or unexported fields
}
QueryServer defines the gRPC server for the x/feemarket module.
func (QueryServer) GasPrice ¶
func (q QueryServer) GasPrice(goCtx context.Context, req *types.GasPriceRequest) (*types.GasPriceResponse, error)
GasPrice defines a method that returns the current feemarket base gas price.
func (QueryServer) GasPrices ¶
func (q QueryServer) GasPrices(goCtx context.Context, _ *types.GasPricesRequest) (*types.GasPricesResponse, error)
GasPrices defines a method that returns the current feemarket list of gas prices.
func (QueryServer) Params ¶
func (q QueryServer) Params(goCtx context.Context, _ *types.ParamsRequest) (*types.ParamsResponse, error)
Params defines a method that returns the current feemarket parameters.
func (QueryServer) State ¶
func (q QueryServer) State(goCtx context.Context, _ *types.StateRequest) (*types.StateResponse, error)
State defines a method that returns the current feemarket state.