simulation

package
v0.0.0-...-03ee383 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgAddReaction              = "op_weight_msg_add_reactions"
	OpWeightMsgRemoveReaction           = "op_weight_msg_remove_reaction"
	OpWeightMsgAddRegisteredReaction    = "op_weight_msg_add_registered_reaction"
	OpWeightMsgEditRegisteredReaction   = "op_weight_msg_edit_registered_reaction"
	OpWeightMsgRemoveRegisteredReaction = "op_weight_msg_remove_registered_reaction"
	OpWeightMsgSetReactionsParams       = "op_weight_msg_set_reactions_params"

	DefaultGasValue = 200_000
)

Simulation operation weights constants #nosec G101 -- This is a false positive

Variables

This section is empty.

Functions

func GenerateRandomDisplayValue

func GenerateRandomDisplayValue(r *rand.Rand) string

GenerateRandomDisplayValue returns a random display value

func GenerateRandomShorthandCode

func GenerateRandomShorthandCode(r *rand.Rand) string

GenerateRandomShorthandCode returns a random shorthand code

func GenerateRandomSubspaceReactionsParams

func GenerateRandomSubspaceReactionsParams(r *rand.Rand, subspaceID uint64) types.SubspaceReactionsParams

GenerateRandomSubspaceReactionsParams returns a randomly reactions params

func GetRandomFreeTextValue

func GetRandomFreeTextValue(r *rand.Rand, limit uint32) string

GetRandomFreeTextValue returns a random free text value based on the given limit

func NewDecodeStore

func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string

NewDecodeStore returns a new decoder that unmarshals the KVPair's Value to the corresponding reactions type

func RandomReaction

func RandomReaction(r *rand.Rand, reactions []types.Reaction) types.Reaction

RandomReaction returns a random reaction from the slice given

func RandomRegisteredReaction

func RandomRegisteredReaction(r *rand.Rand, reactions []types.RegisteredReaction) types.RegisteredReaction

RandomRegisteredReaction returns a random registered reaction from the slice given

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState

func SimulateMsgAddReaction

SimulateMsgAddReaction tests and runs a single MsgAddReaction

func SimulateMsgAddRegisteredReaction

func SimulateMsgAddRegisteredReaction(
	sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper,
) simtypes.Operation

SimulateMsgAddRegisteredReaction tests and runs a single MsgAddRegisteredReaction

func SimulateMsgEditRegisteredReaction

func SimulateMsgEditRegisteredReaction(
	k keeper.Keeper, sk subspaceskeeper.Keeper,
	ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper,
) simtypes.Operation

SimulateMsgEditRegisteredReaction tests and runs a single MsgEditRegisteredReaction

func SimulateMsgRemoveReaction

SimulateMsgRemoveReaction tests and runs a single MsgRemoveReaction

func SimulateMsgRemoveRegisteredReaction

func SimulateMsgRemoveRegisteredReaction(
	k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper,
) simtypes.Operation

SimulateMsgRemoveRegisteredReaction tests and runs a single MsgRemoveRegisteredReaction

func SimulateMsgSetReactionsParams

func SimulateMsgSetReactionsParams(
	sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper,
) simtypes.Operation

SimulateMsgSetReactionsParams tests and runs a single MsgSetReactionsParams

func WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL