bf54193669
* change basefee to a module params * add changelog and fix linter * change params type of basefee and remove default base fee * restaure event * clean code * fix proto * fix protos * fix logic * update rpc tests * fix comment Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
30 lines
747 B
Go
30 lines
747 B
Go
package feemarket
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
abci "github.com/tendermint/tendermint/abci/types"
|
|
|
|
"github.com/tharsis/ethermint/x/feemarket/keeper"
|
|
"github.com/tharsis/ethermint/x/feemarket/types"
|
|
)
|
|
|
|
// InitGenesis initializes genesis state based on exported genesis
|
|
func InitGenesis(
|
|
ctx sdk.Context,
|
|
k keeper.Keeper,
|
|
data types.GenesisState,
|
|
) []abci.ValidatorUpdate {
|
|
k.SetParams(ctx, data.Params)
|
|
k.SetBlockGasUsed(ctx, data.BlockGas)
|
|
|
|
return []abci.ValidatorUpdate{}
|
|
}
|
|
|
|
// ExportGenesis exports genesis state of the fee market module
|
|
func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
|
|
return &types.GenesisState{
|
|
Params: k.GetParams(ctx),
|
|
BlockGas: k.GetBlockGasUsed(ctx),
|
|
}
|
|
}
|