github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/x/auth/simulation/params.go (about)

     1  package simulation
     2  
     3  // DONTCOVER
     4  
     5  import (
     6  	"fmt"
     7  	"math/rand"
     8  
     9  	"github.com/fibonacci-chain/fbc/libs/cosmos-sdk/x/auth/types"
    10  	"github.com/fibonacci-chain/fbc/libs/cosmos-sdk/x/simulation"
    11  )
    12  
    13  const (
    14  	keyMaxMemoCharacters = "MaxMemoCharacters"
    15  	keyTxSigLimit        = "TxSigLimit"
    16  	keyTxSizeCostPerByte = "TxSizeCostPerByte"
    17  )
    18  
    19  // ParamChanges defines the parameters that can be modified by param change proposals
    20  // on the simulation
    21  func ParamChanges(r *rand.Rand) []simulation.ParamChange {
    22  	return []simulation.ParamChange{
    23  		simulation.NewSimParamChange(types.ModuleName, keyMaxMemoCharacters,
    24  			func(r *rand.Rand) string {
    25  				return fmt.Sprintf("\"%d\"", GenMaxMemoChars(r))
    26  			},
    27  		),
    28  		simulation.NewSimParamChange(types.ModuleName, keyTxSigLimit,
    29  			func(r *rand.Rand) string {
    30  				return fmt.Sprintf("\"%d\"", GenTxSigLimit(r))
    31  			},
    32  		),
    33  		simulation.NewSimParamChange(types.ModuleName, keyTxSizeCostPerByte,
    34  			func(r *rand.Rand) string {
    35  				return fmt.Sprintf("\"%d\"", GenTxSizeCostPerByte(r))
    36  			},
    37  		),
    38  	}
    39  }