-
Notifications
You must be signed in to change notification settings - Fork 39
/
params.go
35 lines (30 loc) · 983 Bytes
/
params.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package simulation
// DONTCOVER
import (
"fmt"
"math/rand"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"
"github.com/classic-terra/core/v3/x/market/types"
)
// ParamChanges defines the parameters that can be modified by param change proposals
// on the simulation
func ParamChanges(*rand.Rand) []simtypes.LegacyParamChange {
return []simtypes.LegacyParamChange{
simulation.NewSimLegacyParamChange(types.ModuleName, string(types.KeyBasePool),
func(r *rand.Rand) string {
return fmt.Sprintf("\"%s\"", GenBasePool(r))
},
),
simulation.NewSimLegacyParamChange(types.ModuleName, string(types.KeyPoolRecoveryPeriod),
func(r *rand.Rand) string {
return fmt.Sprintf("\"%d\"", GenPoolRecoveryPeriod(r))
},
),
simulation.NewSimLegacyParamChange(types.ModuleName, string(types.KeyMinStabilitySpread),
func(r *rand.Rand) string {
return fmt.Sprintf("\"%s\"", GenMinSpread(r))
},
),
}
}