Documentation ¶
Index ¶
- Constants
- func GenerateRandomAttachment(r *rand.Rand, post types.Post, id uint32) types.Attachment
- func GenerateRandomAttachmentContent(r *rand.Rand) types.AttachmentContent
- func GenerateRandomMedia(r *rand.Rand) *types.Media
- func GenerateRandomPoll(r *rand.Rand) *types.Poll
- func GenerateRandomPost(r *rand.Rand, accounts []simtypes.Account, subspaceID uint64, sectionID uint32, ...) types.Post
- func GenerateRandomTags(r *rand.Rand, tagsNumber int) []string
- func GenerateRandomText(r *rand.Rand, maxLength uint32) string
- func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string
- func ParamChanges(r *rand.Rand) []simtypes.ParamChange
- func RandomAnswersIndexes(r *rand.Rand, poll *types.Poll) (answersIndexes []uint32)
- func RandomAttachment(r *rand.Rand, attachments []types.Attachment) types.Attachment
- func RandomMaxTextLength(r *rand.Rand) uint32
- func RandomPost(r *rand.Rand, posts []types.Post) types.Post
- func RandomReplySettings(r *rand.Rand) types.ReplySetting
- func RandomizeGenState(simState *module.SimulationState)
- func SimulateMsgAddPostAttachment(k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, ...) simtypes.Operation
- func SimulateMsgAnswerPoll(k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, ...) simtypes.Operation
- func SimulateMsgCreatePost(k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, ...) simtypes.Operation
- func SimulateMsgDeletePost(k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, ...) simtypes.Operation
- func SimulateMsgEditPost(k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, ...) simtypes.Operation
- func SimulateMsgRemovePostAttachment(k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, ...) simtypes.Operation
- func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, k keeper.Keeper, ...) sim.WeightedOperations
Constants ¶
const ( OpWeightMsgCreatePost = "op_weight_msg_create_post" OpWeightMsgEditPost = "op_weight_msg_edit_post" OpWeightMsgDeletePost = "op_weight_msg_delete_post" OpWeightMsgAddPostAttachment = "op_weight_msg_add_post_attachment" OpWeightMsgRemovePostAttachment = "op_weight_msg_remove_post_attachment" OpWeightMsgAnswerPoll = "op_weight_msg_answer_poll" DefaultGasValue = 200000 )
Simulation operation weights constants
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomAttachment ¶
GenerateRandomAttachment generates a random attachment
func GenerateRandomAttachmentContent ¶
func GenerateRandomAttachmentContent(r *rand.Rand) types.AttachmentContent
GenerateRandomAttachmentContent returns a randomly generated attachment content
func GenerateRandomMedia ¶
GenerateRandomMedia returns a randomly generated media content
func GenerateRandomPoll ¶
GenerateRandomPoll returns a randomly generated poll content
func GenerateRandomPost ¶
func GenerateRandomPost(r *rand.Rand, accounts []simtypes.Account, subspaceID uint64, sectionID uint32, postID uint64, params types.Params) types.Post
GenerateRandomPost generates a random post
func GenerateRandomTags ¶
GenerateRandomTags returns a slice containing tagsNumber randomly generated tags
func GenerateRandomText ¶
GenerateRandomText returns a random text that does not exceed the given max length
func NewDecodeStore ¶
NewDecodeStore returns a new decoder that unmarshals the KVPair's Value to the corresponding subspaces type
func ParamChanges ¶
func ParamChanges(r *rand.Rand) []simtypes.ParamChange
func RandomAnswersIndexes ¶
RandomAnswersIndexes returns a random answers indexes slice based on the given poll
func RandomAttachment ¶
func RandomAttachment(r *rand.Rand, attachments []types.Attachment) types.Attachment
RandomAttachment returns a random attachment from the ones given
func RandomMaxTextLength ¶
RandomMaxTextLength returns a random max text length in the [30, 999] range
func RandomPost ¶
RandomPost returns a random post from the slice given
func RandomReplySettings ¶
func RandomReplySettings(r *rand.Rand) types.ReplySetting
RandomReplySettings returns a random valid ReplySetting for the post
func RandomizeGenState ¶
func RandomizeGenState(simState *module.SimulationState)
RandomizeGenState generates a random GenesisState for posts
func SimulateMsgAddPostAttachment ¶
func SimulateMsgAddPostAttachment( k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper, ) simtypes.Operation
SimulateMsgAddPostAttachment tests and runs a single msg add post attachment
func SimulateMsgAnswerPoll ¶
func SimulateMsgAnswerPoll( k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper, ) simtypes.Operation
SimulateMsgAnswerPoll tests and runs a single msg answer poll post
func SimulateMsgCreatePost ¶
func SimulateMsgCreatePost( k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper, ) simtypes.Operation
SimulateMsgCreatePost tests and runs a single msg create post
func SimulateMsgDeletePost ¶
func SimulateMsgDeletePost( k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper, ) simtypes.Operation
SimulateMsgDeletePost tests and runs a single msg delete post
func SimulateMsgEditPost ¶
func SimulateMsgEditPost( k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper, ) simtypes.Operation
SimulateMsgEditPost tests and runs a single msg edit post
func SimulateMsgRemovePostAttachment ¶
func SimulateMsgRemovePostAttachment( k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper, ) simtypes.Operation
SimulateMsgRemovePostAttachment tests and runs a single msg remove post attachment
func WeightedOperations ¶
func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, k keeper.Keeper, sk subspaceskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper, ) sim.WeightedOperations
WeightedOperations returns all the operations from the module with their respective weights
Types ¶
This section is empty.