mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-27 00:35:18 +00:00
42 lines
1.2 KiB
Go
42 lines
1.2 KiB
Go
package v0_17
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/client"
|
|
|
|
authz "github.com/cosmos/cosmos-sdk/x/authz"
|
|
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)
|
|
|
|
// x/authz
|
|
authzState := authz.DefaultGenesisState()
|
|
appState[authz.ModuleName] = codec.MustMarshalJSON(authzState)
|
|
}
|