laconicd-deprecated/x/feemarket/migrations/v4/migrate.go
mmsqe 5f7ee9bfad
fix: avoid duplicate register proto type in evm & feemarket (#1586)
* update dep

* make proto-all

* avoid duplicate register proto type in evm

* set KeyTable

* update from version to v.19.x which support submit-proposal

* test AvailableExtraEIPs

* keep grpc query compatible with version before migrate

* fix duplicate register & migrate in feemarket

* update nix

* support typed event for bloom & txLog

* partial revert typed ethereumTx

* Revert "partial revert typed ethereumTx"

This reverts commit 314bb288f385b79f6fff6badff79cd790b74a27e.

* Revert "support typed event for bloom & txLog"

This reverts commit 287d3aec30a951a7cece40a0c310858997850a3d.

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>
2023-01-12 10:52:55 +02:00

39 lines
891 B
Go

package v4
import (
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/evmos/ethermint/x/feemarket/types"
)
// MigrateStore migrates the x/evm module state from the consensus version 3 to
// version 4. Specifically, it takes the parameters that are currently stored
// and managed by the Cosmos SDK params module and stores them directly into the x/evm module state.
func MigrateStore(
ctx sdk.Context,
storeKey storetypes.StoreKey,
legacySubspace types.Subspace,
cdc codec.BinaryCodec,
) error {
var (
store = ctx.KVStore(storeKey)
params types.Params
)
legacySubspace.GetParamSetIfExists(ctx, &params)
if err := params.Validate(); err != nil {
return err
}
bz, err := cdc.Marshal(&params)
if err != nil {
return err
}
store.Set(types.ParamsKey, bz)
return nil
}