-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(
mint
): cleanup module (#58)
* remove old keys * refactor gen state * refactor module * fix * move abci into keeper * refactor begin blocker * refactor begin blocker * cleanup * format * format Co-authored-by: Lucas Btd <[email protected]>
- Loading branch information
Showing
8 changed files
with
100 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package keeper_test | ||
|
||
import "testing" | ||
|
||
// TODO add test | ||
func TestBeginBlocker(t *testing.T) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package mint | ||
|
||
import ( | ||
"math/rand" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
simtypes "github.com/cosmos/cosmos-sdk/types/simulation" | ||
|
||
"github.com/ignite/modules/x/mint/simulation" | ||
"github.com/ignite/modules/x/mint/types" | ||
) | ||
|
||
// AppModuleSimulation functions | ||
|
||
// GenerateGenesisState creates a randomized GenState of the mint module. | ||
func (AppModule) GenerateGenesisState(simState *module.SimulationState) { | ||
simulation.RandomizedGenState(simState) | ||
} | ||
|
||
// ProposalContents doesn't return any content functions for governance proposals. | ||
func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { | ||
return nil | ||
} | ||
|
||
// RandomizedParams creates randomized mint param changes for the simulator. | ||
func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { | ||
return simulation.ParamChanges(r) | ||
} | ||
|
||
// RegisterStoreDecoder registers a decoder for mint module's types. | ||
func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { | ||
sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) | ||
} | ||
|
||
// WeightedOperations doesn't return any mint module operation. | ||
func (AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters