mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
c7b1331f4d
* stub out simulation integration for cdp, pricefeed * stub out simulation integration for auction * fix cdp export * update pricefeed to match * update validator-vesting to match
23 lines
680 B
Go
23 lines
680 B
Go
package simulation
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
"github.com/cosmos/cosmos-sdk/types/module"
|
|
|
|
"github.com/kava-labs/kava/x/cdp/types"
|
|
)
|
|
|
|
// RandomizedGenState generates a random GenesisState for cdp
|
|
func RandomizedGenState(simState *module.SimulationState) {
|
|
|
|
// TODO implement this fully
|
|
// - randomly generating the genesis params
|
|
// - overwriting with genesis provided to simulation
|
|
cdpGenesis := types.DefaultGenesisState()
|
|
|
|
fmt.Printf("Selected randomly generated %s parameters:\n%s\n", types.ModuleName, codec.MustMarshalJSONIndent(simState.Cdc, cdpGenesis))
|
|
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(cdpGenesis)
|
|
}
|