keeper

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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

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

BlockGas implements the Query/BlockGas gRPC method

func (Keeper) CalculateBaseFee

func (k Keeper) CalculateBaseFee(ctx sdk.Context) *big.Int

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

func (k Keeper) GetBaseFee(ctx sdk.Context) *big.Int

GetLastBaseFee returns the last base fee value from the store.

func (Keeper) GetBlockGasUsed

func (k Keeper) GetBlockGasUsed(ctx sdk.Context) uint64

GetBlockGasUsed returns the last block gas used value from the store.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams returns the total set of fee market parameters.

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) Params

Params implements the Query/Params gRPC method

func (Keeper) SetBaseFee

func (k Keeper) SetBaseFee(ctx sdk.Context, baseFee *big.Int)

SetBaseFee set the last base fee value to the store. CONTRACT: this should be only called during EndBlock.

func (Keeper) SetBlockGasUsed

func (k Keeper) SetBlockGasUsed(ctx sdk.Context, gas uint64)

SetBlockGasUsed gets the block gas consumed to the store. CONTRACT: this should be only called during EndBlock.

func (Keeper) SetParams

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

SetParams sets the fee market parameters to the param space.

type Migrator

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

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

Jump to

Keyboard shortcuts

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