github.com/cosmos/cosmos-sdk@v0.50.10/x/crisis/types/legacy_params.go (about) 1 package types 2 3 import ( 4 "fmt" 5 6 sdk "github.com/cosmos/cosmos-sdk/types" 7 paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" 8 ) 9 10 // ParamStoreKeyConstantFee is the constant fee parameter 11 var ParamStoreKeyConstantFee = []byte("ConstantFee") 12 13 // Deprecated: Type declaration for parameters 14 func ParamKeyTable() paramtypes.KeyTable { 15 return paramtypes.NewKeyTable( 16 paramtypes.NewParamSetPair(ParamStoreKeyConstantFee, sdk.Coin{}, validateConstantFee), 17 ) 18 } 19 20 func validateConstantFee(i interface{}) error { 21 v, ok := i.(sdk.Coin) 22 if !ok { 23 return fmt.Errorf("invalid parameter type: %T", i) 24 } 25 26 if !v.IsValid() { 27 return fmt.Errorf("invalid constant fee: %s", v) 28 } 29 30 return nil 31 }