Documentation ¶
Index ¶
- func NewMsgServer(k Keeper) types.MsgServer
- func NewQueryServer(keeper Keeper) types.QueryServer
- type Keeper
- func (k *Keeper) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) GetAuthority() string
- func (k *Keeper) GetBaseFee(ctx sdk.Context) (math.Int, error)
- func (k *Keeper) GetLearningRate(ctx sdk.Context) (math.LegacyDec, error)
- func (k *Keeper) GetMinGasPrices(ctx sdk.Context) (sdk.Coins, 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) 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) BaseFee(goCtx context.Context, _ *types.BaseFeeRequest) (*types.BaseFeeResponse, 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
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, authKeeper types.AccountKeeper, authority string, ) *Keeper
NewKeeper constructs a new feemarket keeper.
func (*Keeper) EndBlock ¶
func (k *Keeper) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
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) GetBaseFee ¶
GetBaseFee returns the base fee from the fee market state.
func (*Keeper) GetLearningRate ¶
GetLearningRate returns the learning rate from the fee market state.
func (*Keeper) GetMinGasPrices ¶
GetMinGasPrices returns the mininum gas prices as sdk.Coins 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) 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) BaseFee ¶
func (q QueryServer) BaseFee(goCtx context.Context, _ *types.BaseFeeRequest) (*types.BaseFeeResponse, error)
BaseFee defines a method that returns the current feemarket base fee.
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.