Documentation ¶
Index ¶
- Constants
- func Dispatch(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, from simtypes.Account, ...) (simtypes.OperationMsg, []simtypes.FutureOperation, error)
- func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string
- func NewRandomAction(r *rand.Rand, from string, to string) sdk.Msg
- func NewRandomEvent(r *rand.Rand, now time.Time) types.TriggerEventI
- func NewRandomGasLimit(r *rand.Rand) uint64
- func NewRandomQueuedTrigger(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, ...) types.QueuedTrigger
- func NewRandomTrigger(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, ...) types.Trigger
- func QueueStartFn(r *rand.Rand) uint64
- func RandomAccs(r *rand.Rand, accs []simtypes.Account, count uint64) ([]simtypes.Account, error)
- func RandomGasLimits(r *rand.Rand, triggers []types.Trigger, queuedTriggers []types.QueuedTrigger) []types.GasLimit
- func RandomNewQueuedTriggers(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, ...) []types.QueuedTrigger
- func RandomNewTriggers(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, ...) []types.Trigger
- func RandomizedGenState(simState *module.SimulationState)
- func SimulateMsgCreateTrigger(_ keeper.Keeper, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper) simtypes.Operation
- func SimulateMsgDestroyTrigger(k keeper.Keeper, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper) simtypes.Operation
- func TriggerIDStartFn(r *rand.Rand) uint64
- func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, k keeper.Keeper, ...) simulation.WeightedOperations
Constants ¶
const ( TriggerID = "trigger_id" QueueStart = "trigger_queue_start" NumIniTrig = "num_ini_trig" NumIniTrigQueued = "num_ini_trig_queued" Triggers = "triggers" QueuedTriggers = "queued_triggers" GasLimits = "trigger_gas_limits" )
const ( //nolint:gosec // not credentials OpWeightMsgCreateTrigger = "op_weight_msg_create_trigger" //nolint:gosec // not credentials OpWeightMsgDestroyTrigger = "op_weight_msg_destroy_trigger" )
Simulation operation weights constants
Variables ¶
This section is empty.
Functions ¶
func Dispatch ¶
func Dispatch( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, from simtypes.Account, chainID string, msg sdk.Msg, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, futures []simtypes.FutureOperation, ) ( simtypes.OperationMsg, []simtypes.FutureOperation, error, )
Dispatch sends an operation to the chain using a given account/funds on account for fees. Failures on the server side are handled as no-op msg operations with the error string as the status/response.
func NewDecodeStore ¶
NewDecodeStore returns a decoder function closure that unmarshalls the KVPair's Value
func NewRandomAction ¶
NewRandomAction returns a random action
func NewRandomEvent ¶
NewRandomEvent returns a random event
func NewRandomGasLimit ¶
NewRandomGasLimit randomized Gas Limit
func NewRandomQueuedTrigger ¶
func NewRandomQueuedTrigger(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, id types.TriggerID) types.QueuedTrigger
NewRandomQueuedTrigger returns a random queued trigger
func NewRandomTrigger ¶
func NewRandomTrigger(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, id types.TriggerID) types.Trigger
NewRandomTrigger returns a random trigger
func QueueStartFn ¶
QueueStartFn randomized Queue Start Index
func RandomAccs ¶
func RandomGasLimits ¶
func RandomGasLimits(r *rand.Rand, triggers []types.Trigger, queuedTriggers []types.QueuedTrigger) []types.GasLimit
RandomGasLimits generates random gas limits for all the provided triggers and queued triggers.
func RandomNewQueuedTriggers ¶
func RandomNewQueuedTriggers(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, queuedTriggerIds []uint64) []types.QueuedTrigger
RandomNewQueuedTriggers generates a random queued trigger for each provided id.
func RandomNewTriggers ¶
func RandomNewTriggers(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, triggerIDs []uint64) []types.Trigger
RandomNewTriggers generates a random trigger for each provided id.
func RandomizedGenState ¶
func RandomizedGenState(simState *module.SimulationState)
RandomizedGenState generates a random GenesisState for trigger
func SimulateMsgCreateTrigger ¶
func SimulateMsgCreateTrigger(_ keeper.Keeper, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper) simtypes.Operation
SimulateMsgCreateTrigger sends a MsgCreateTriggerRequest.
func SimulateMsgDestroyTrigger ¶
func SimulateMsgDestroyTrigger(k keeper.Keeper, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper) simtypes.Operation
SimulateMsgDestroyTrigger sends a MsgDestroyTriggerRequest.
func TriggerIDStartFn ¶
TriggerIDStartFn randomized starting trigger id
func WeightedOperations ¶
func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, k keeper.Keeper, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, ) simulation.WeightedOperations
WeightedOperations returns all the operations from the module with their respective weights
Types ¶
This section is empty.