Skip to main content
Version: v0.25

Module parameters

Sometimes you need to set default parameters for a module. The Cosmos SDK params package provides a globally available parameter that is saved into the key-value store.

Params are managed and centralized by the Cosmos SDK params module and are updated with a governance proposal.

You can use Ignite CLI to scaffold parameters to be accessible for the module. Parameters have default values that can be changed when the chain is live. Since the parameters are managed and centralized by the Cosmos SDK params module, they can be easily updated using a governance proposal.

To scaffold a module with params using the --params flag:

ignite scaffold module launch --params minLaunch:uint,maxLaunch:int

After the parameters are scaffolded, change the x/<module>/types/params.go file to set the default values and validate the fields.

The params module supports all built-in Ignite CLI types.

Params types

TypeCode typeDescription
stringstringText type
boolboolBoolean type
intint32Integer number
uintuint64Unsigned integer number