keeper

package
v0.0.1-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServer

func NewMsgServer(k Keeper) types.MsgServer

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

func (k *Keeper) GetAuthority() string

GetAuthority returns the address that is capable of executing a MsgUpdateParams message.

func (*Keeper) GetBaseFee

func (k *Keeper) GetBaseFee(ctx sdk.Context) (math.Int, error)

GetBaseFee returns the base fee from the fee market state.

func (*Keeper) GetLearningRate

func (k *Keeper) GetLearningRate(ctx sdk.Context) (math.LegacyDec, error)

GetLearningRate returns the learning rate from the fee market state.

func (*Keeper) GetMinGasPrices

func (k *Keeper) GetMinGasPrices(ctx sdk.Context) (sdk.Coins, error)

GetMinGasPrices returns the mininum gas prices as sdk.Coins from the fee market state.

func (*Keeper) GetParams

func (k *Keeper) GetParams(ctx sdk.Context) (types.Params, error)

GetParams returns the feemarket module's parameters.

func (*Keeper) GetState

func (k *Keeper) GetState(ctx sdk.Context) (types.State, error)

GetState returns the feemarket module's 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) Logger

func (k *Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a feemarket module-specific logger.

func (*Keeper) SetParams

func (k *Keeper) SetParams(ctx sdk.Context, params types.Params) error

SetParams sets the feemarket module's parameters.

func (*Keeper) SetState

func (k *Keeper) SetState(ctx sdk.Context, state types.State) error

SetState sets the feemarket module's state.

func (*Keeper) UpdateFeeMarket

func (k *Keeper) UpdateFeeMarket(ctx sdk.Context) error

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.

func (MsgServer) Params

func (ms MsgServer) Params(goCtx context.Context, msg *types.MsgParams) (*types.MsgParamsResponse, error)

Params defines a method that updates the module's parameters. The signer of the message must be the module authority.

type QueryServer

type QueryServer struct {
	// contains filtered or unexported fields
}

QueryServer defines the gRPC server for the x/feemarket module.

func (QueryServer) BaseFee

BaseFee defines a method that returns the current feemarket base fee.

func (QueryServer) Params

Params defines a method that returns the current feemarket parameters.

func (QueryServer) State

State defines a method that returns the current feemarket state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL