32 lines
637 B
Go
32 lines
637 B
Go
package types
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
|
)
|
|
|
|
const (
|
|
// DefaultSendEnabled enabled
|
|
DefaultSendEnabled = true
|
|
)
|
|
|
|
// ParamStoreKeySendEnabled is store's key for SendEnabled
|
|
var ParamStoreKeySendEnabled = []byte("sendenabled")
|
|
|
|
// ParamKeyTable type declaration for parameters
|
|
func ParamKeyTable() paramtypes.KeyTable {
|
|
return paramtypes.NewKeyTable(
|
|
paramtypes.NewParamSetPair(ParamStoreKeySendEnabled, false, validateSendEnabled),
|
|
)
|
|
}
|
|
|
|
func validateSendEnabled(i interface{}) error {
|
|
_, ok := i.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("invalid parameter type: %T", i)
|
|
}
|
|
|
|
return nil
|
|
}
|