2020-04-24 21:55:18 +00:00
|
|
|
package simulation
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
|
|
"github.com/cosmos/cosmos-sdk/types/module"
|
|
|
|
|
2024-05-01 03:17:24 +00:00
|
|
|
"github.com/0glabs/0g-chain/x/incentive/types"
|
2020-04-24 21:55:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2020-06-05 02:14:40 +00:00
|
|
|
CollateralDenoms = []string{}
|
2020-04-24 21:55:18 +00:00
|
|
|
RewardDenom = "ukava"
|
2023-04-05 23:21:59 +00:00
|
|
|
MaxTotalAssetReward = sdkmath.NewInt(1000000000)
|
2020-04-24 21:55:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// RandomizedGenState generates a random GenesisState for incentive module
|
|
|
|
func RandomizedGenState(simState *module.SimulationState) {
|
|
|
|
// New genesis state holds valid, linked reward periods, claim periods, and claim period IDs
|
2021-01-18 19:12:37 +00:00
|
|
|
incentiveGenesis := types.DefaultGenesisState()
|
2020-04-24 21:55:18 +00:00
|
|
|
|
|
|
|
fmt.Printf("Selected randomly generated %s parameters:\n%s\n", types.ModuleName, codec.MustMarshalJSONIndent(simState.Cdc, incentiveGenesis))
|
|
|
|
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(incentiveGenesis)
|
|
|
|
}
|