laconicd-deprecated/x/evm/migrations/v2/migrate.go
Federico Kunze Küllmer 8e2c65295f
imp(evm): rename RejectUnprotectedTx to AllowUnprotectedTxs (#1142)
* imp(evm): rename RejectUnprotectedTx to AllowUnprotectedTxs

* changelog
2022-06-22 12:51:14 +02:00

20 lines
551 B
Go

package v2
import (
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/evmos/ethermint/x/evm/types"
)
// MigrateStore sets the default AllowUnprotectedTxs parameter.
func MigrateStore(ctx sdk.Context, paramstore *paramtypes.Subspace) error {
if !paramstore.HasKeyTable() {
ps := paramstore.WithKeyTable(types.ParamKeyTable())
paramstore = &ps
}
// add RejectUnprotected
paramstore.Set(ctx, types.ParamStoreKeyAllowUnprotectedTxs, types.DefaultAllowUnprotectedTxs)
return nil
}