2022-04-21 20:16:28 +00:00
|
|
|
package v0_17
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/cosmos/cosmos-sdk/client"
|
|
|
|
|
2022-04-22 15:58:55 +00:00
|
|
|
authz "github.com/cosmos/cosmos-sdk/x/authz"
|
2022-04-21 20:16:28 +00:00
|
|
|
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
|
|
|
|
evmtypes "github.com/tharsis/ethermint/x/evm/types"
|
|
|
|
feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types"
|
|
|
|
|
|
|
|
evmutiltypes "github.com/kava-labs/kava/x/evmutil/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
func migrateAppState(appState genutiltypes.AppMap, clientCtx client.Context) {
|
|
|
|
codec := clientCtx.Codec
|
|
|
|
|
|
|
|
// x/emvutil
|
|
|
|
evmUtilGenState := evmutiltypes.NewGenesisState([]evmutiltypes.Account{})
|
|
|
|
appState[evmutiltypes.ModuleName] = codec.MustMarshalJSON(evmUtilGenState)
|
|
|
|
|
|
|
|
// x/evm
|
|
|
|
evmGenState := &evmtypes.GenesisState{
|
|
|
|
Accounts: []evmtypes.GenesisAccount{},
|
|
|
|
Params: evmtypes.Params{
|
|
|
|
EvmDenom: "akava",
|
|
|
|
EnableCreate: true,
|
|
|
|
EnableCall: true,
|
|
|
|
ChainConfig: evmtypes.DefaultChainConfig(),
|
|
|
|
ExtraEIPs: nil,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
appState[evmtypes.ModuleName] = codec.MustMarshalJSON(evmGenState)
|
|
|
|
|
|
|
|
// x/feemarket
|
|
|
|
feemarketState := feemarkettypes.DefaultGenesisState()
|
|
|
|
appState[feemarkettypes.ModuleName] = codec.MustMarshalJSON(feemarketState)
|
2022-04-22 15:58:55 +00:00
|
|
|
|
|
|
|
// x/authz
|
|
|
|
authzState := authz.DefaultGenesisState()
|
|
|
|
appState[authz.ModuleName] = codec.MustMarshalJSON(authzState)
|
2022-04-21 20:16:28 +00:00
|
|
|
}
|