Documentation ¶
Overview ¶
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/zeta-chain/ethermint/blob/main/LICENSE
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/zeta-chain/ethermint/blob/main/LICENSE
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/zeta-chain/ethermint/blob/main/LICENSE
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/zeta-chain/ethermint/blob/main/LICENSE
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/zeta-chain/ethermint/blob/main/LICENSE
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/zeta-chain/ethermint/blob/main/LICENSE
Index ¶
- Variables
- type Keeper
- func (k Keeper) AddTransientGasWanted(ctx sdk.Context, gasWanted uint64) (uint64, error)
- func (k Keeper) BaseFee(c context.Context, _ *types.QueryBaseFeeRequest) (*types.QueryBaseFeeResponse, error)
- func (k *Keeper) BeginBlock(ctx sdk.Context, _ 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, _ abci.RequestEndBlock)
- func (k Keeper) GetBaseFee(ctx sdk.Context) *big.Int
- func (k Keeper) GetBaseFeeEnabled(ctx sdk.Context) bool
- func (k Keeper) GetBaseFeeV1(ctx sdk.Context) *big.Int
- func (k Keeper) GetBlockGasWanted(ctx sdk.Context) uint64
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetTransientGasWanted(ctx sdk.Context) uint64
- 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) SetBlockGasWanted(ctx sdk.Context, gas uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) SetTransientBlockGasWanted(ctx sdk.Context, gasWanted uint64)
- func (k *Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
var KeyPrefixBaseFeeV1 = []byte{2}
KeyPrefixBaseFeeV1 TODO: Temporary will be removed with params refactor PR
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, authority sdk.AccAddress, storeKey, transientKey storetypes.StoreKey, ss paramstypes.Subspace, ck consensusparamkeeper.Keeper, ) Keeper
NewKeeper generates new fee market module keeper
func (Keeper) AddTransientGasWanted ¶
AddTransientGasWanted adds the cumulative gas wanted in the transient store
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, _ 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, _ abci.RequestEndBlock)
EndBlock update block gas wanted. The EVM end block logic doesn't update the validator set, thus it returns an empty slice.
func (Keeper) GetBaseFee ¶
GetBaseFee gets the base fee from the store
func (Keeper) GetBaseFeeEnabled ¶
GetBaseFeeEnabled returns true if base fee is enabled
func (Keeper) GetBaseFeeV1 ¶
GetBaseFeeV1 get the base fee from v1 version of states. return nil if base fee is not enabled TODO: Figure out if this will be deleted ?
func (Keeper) GetBlockGasWanted ¶
GetBlockGasWanted returns the last block gas wanted value from the store.
func (Keeper) GetTransientGasWanted ¶
GetTransientGasWanted returns the gas wanted in the current block from transient 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 store
func (Keeper) SetBlockGasWanted ¶
SetBlockGasWanted sets the block gas wanted to the store. CONTRACT: this should be only called during EndBlock.
func (Keeper) SetTransientBlockGasWanted ¶
SetTransientBlockGasWanted sets the block gas wanted to the transient store.
func (*Keeper) UpdateParams ¶
func (k *Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
UpdateParams implements the gRPC MsgServer interface. When an UpdateParams proposal passes, it updates the module parameters. The update can only be performed if the requested authority is the Cosmos SDK governance module account.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func NewMigrator ¶
NewMigrator returns a new Migrator.