diff --git a/types/params.go b/types/params.go index 7d4c4ad..45f8da2 100644 --- a/types/params.go +++ b/types/params.go @@ -4,28 +4,14 @@ import ( "fmt" errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -// Default period for closing bids for an auction var ( + //DefaultDenomCreationFee Default period for closing bids for an auction DefaultDenomCreationFee = sdk.NewInt64Coin("uflix", 100_000_000) // 100FLIX ) -// Parameter keys -var ( - ParamStoreKeyDenomCreationFee = []byte("DenomCreationFee") -) - -var _ paramtypes.ParamSet = (*Params)(nil) - -// ParamKeyTable returns the parameter key table. -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - func NewONFTParams(denomCreationFee sdk.Coin) Params { return Params{ DenomCreationFee: denomCreationFee, @@ -39,13 +25,6 @@ func DefaultParams() Params { ) } -// ParamSetPairs returns the parameter set pairs. -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(ParamStoreKeyDenomCreationFee, &p.DenomCreationFee, validateDenomCreationFee), - } -} - // ValidateBasic performs basic validation on onft parameters. func (p Params) ValidateBasic() error { if err := validateDenomCreationFee(p.DenomCreationFee); err != nil { diff --git a/types/params_legacy.go b/types/params_legacy.go new file mode 100644 index 0000000..118dba2 --- /dev/null +++ b/types/params_legacy.go @@ -0,0 +1,23 @@ +package types + +import ( + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +var ( + ParamStoreKeyDenomCreationFee = []byte("DenomCreationFee") +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +// ParamKeyTable returns the parameter key table. +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// ParamSetPairs returns the parameter set pairs. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(ParamStoreKeyDenomCreationFee, &p.DenomCreationFee, validateDenomCreationFee), + } +}