forked from cerc-io/laconicd-deprecated
simulation genesis
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package simulation
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
|
||||
"github.com/cerc-io/laconicd/x/auction/types"
|
||||
)
|
||||
|
||||
// RandomizedGenState generates a random GenesisState
|
||||
func RandomizedGenState(simState *module.SimulationState) {
|
||||
auctionGenesis := types.DefaultGenesisState()
|
||||
|
||||
bz, err := json.MarshalIndent(auctionGenesis, "", " ")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Printf("Selected randomly generated %s parameters:\n%s\n", types.ModuleName, bz)
|
||||
|
||||
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(auctionGenesis)
|
||||
}
|
||||
Reference in New Issue
Block a user