2022-06-13 09:41:53 +00:00
|
|
|
package v2
|
|
|
|
|
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
2022-06-19 09:43:41 +00:00
|
|
|
"github.com/evmos/ethermint/x/evm/types"
|
2022-06-13 09:41:53 +00:00
|
|
|
)
|
|
|
|
|
2022-06-22 10:51:14 +00:00
|
|
|
// MigrateStore sets the default AllowUnprotectedTxs parameter.
|
2022-06-13 09:41:53 +00:00
|
|
|
func MigrateStore(ctx sdk.Context, paramstore *paramtypes.Subspace) error {
|
|
|
|
if !paramstore.HasKeyTable() {
|
|
|
|
ps := paramstore.WithKeyTable(types.ParamKeyTable())
|
|
|
|
paramstore = &ps
|
|
|
|
}
|
|
|
|
|
|
|
|
// add RejectUnprotected
|
2022-06-22 10:51:14 +00:00
|
|
|
paramstore.Set(ctx, types.ParamStoreKeyAllowUnprotectedTxs, types.DefaultAllowUnprotectedTxs)
|
2022-06-13 09:41:53 +00:00
|
|
|
return nil
|
|
|
|
}
|