Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 496 Bytes

01_keeper.md

File metadata and controls

19 lines (14 loc) · 496 Bytes

Keeper

In the app initialization stage, subspaces can be allocated for other modules' keeper using Keeper.Subspace and are stored in Keeper.spaces. Then, those modules can have a reference to their specific parameter store through Keeper.GetSubspace.

Example:

type ExampleKeeper struct {
	paramSpace paramtypes.Subspace
}

func (k ExampleKeeper) SetParams(ctx sdk.Context, params types.Params) {
	k.paramSpace.SetParamSet(ctx, &params)
}