Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) BaseFee(c context.Context, _ *types.QueryBaseFeeRequest) (*types.QueryBaseFeeResponse, error)
- func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
- func (k Keeper) BlockGas(c context.Context, _ *types.QueryBlockGasRequest) (*types.QueryBlockGasResponse, error)
- func (k Keeper) CalculateBaseFee(ctx sdk.Context) *big.Int
- func (k *Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock)
- func (k Keeper) GetBaseFee(ctx sdk.Context) *big.Int
- func (k Keeper) GetBlockGasUsed(ctx sdk.Context) uint64
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetBaseFee(ctx sdk.Context, baseFee *big.Int)
- func (k Keeper) SetBlockGasUsed(ctx sdk.Context, gas uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper grants access to the Fee Market module state.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramSpace paramtypes.Subspace, ) Keeper
NewKeeper generates new fee market module keeper
func (Keeper) BaseFee ¶
func (k Keeper) BaseFee(c context.Context, _ *types.QueryBaseFeeRequest) (*types.QueryBaseFeeResponse, error)
BaseFee implements the Query/BaseFee gRPC method
func (*Keeper) BeginBlock ¶
func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
BeginBlock updates base fee
func (Keeper) BlockGas ¶
func (k Keeper) BlockGas(c context.Context, _ *types.QueryBlockGasRequest) (*types.QueryBlockGasResponse, error)
BlockGas implements the Query/BlockGas gRPC method
func (Keeper) CalculateBaseFee ¶
CalculateBaseFee calculates the base fee for the current block. This is only calculated once per block during BeginBlock. If the NoBaseFee parameter is enabled or below activation height, this function returns nil. NOTE: This code is inspired from the go-ethereum EIP1559 implementation and adapted to Cosmos SDK-based chains. For the canonical code refer to: https://github.com/ethereum/go-ethereum/blob/master/consensus/misc/eip1559.go
func (*Keeper) EndBlock ¶
func (k *Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock)
EndBlock update block gas used. The EVM end block logic doesn't update the validator set, thus it returns an empty slice.
func (Keeper) GetBaseFee ¶
GetBaseFee get's the base fee from the paramSpace return nil if base fee is not enabled
func (Keeper) GetBlockGasUsed ¶
GetBlockGasUsed returns the last block gas used value from the store.
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params implements the Query/Params gRPC method
func (Keeper) SetBaseFee ¶
SetBaseFee set's the base fee in the paramSpace
func (Keeper) SetBlockGasUsed ¶
SetBlockGasUsed gets the block gas consumed to the store. CONTRACT: this should be only called during EndBlock.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func (Migrator) Migrate1to2 ¶
Migrate1to2 migrates the store from consensus version v1 to v2