simulation

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgSaveProfile         = "op_weight_msg_save_profile"
	OpWeightMsgDeleteProfile       = "op_weight_msg_delete_profile"
	OpWeightMsgRequestDTagTransfer = "op_weight_msg_request_dtag_transfer"
	OpWeightMsgAcceptDTagTransfer  = "op_weight_msg_accept_dtag_transfer_request"
	OpWeightMsgRefuseDTagTransfer  = "op_weight_msg_refuse_dtag_transfer_request"
	OpWeightMsgCancelDTagTransfer  = "op_weight_msg_cancel_dtag_transfer_request"
	OpWeightMsgCreateRelationship  = "op_weight_msg_create_relationship"
	OpWeightMsgDeleteRelationship  = "op_weight_msg_delete_relationship"
	OpWeightMsgBlockUser           = "op_weight_msg_block_user"
	OpWeightMsgUnBlockUser         = "op_weight_msg_unblock_user"

	DefaultGasValue = 200000
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func GetSimAccount

func GetSimAccount(address sdk.Address, accs []simtypes.Account) *simtypes.Account

GetSimAccount gets the profile having the given address from the accs list

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 relationships type

func NewRandomProfile

func NewRandomProfile(r *rand.Rand, account authtypes.AccountI) *types.Profile

NewRandomProfile return a random ProfileData from random data and the given account nolint:interfacer

func NewRandomProfiles

func NewRandomProfiles(r *rand.Rand, accounts []simtypes.Account, number int) []*types.Profile

NewRandomProfiles returns number random profiles

func ParamChanges

func ParamChanges(r *rand.Rand) []simtypes.ParamChange

func RandomBio

func RandomBio(r *rand.Rand) string

RandomBio return a random bio value from the list of randomBios given

func RandomBioParams

func RandomBioParams(r *rand.Rand) types.BioParams

RandomBioParams return a random biography param

func RandomDTag

func RandomDTag(r *rand.Rand) string

RandomDTag return a random DTag

func RandomDTagParams

func RandomDTagParams(r *rand.Rand) types.DTagParams

RandomDTagParams return a random set of nickname params

func RandomDTagTransferRequest

func RandomDTagTransferRequest(r *rand.Rand, requests []types.DTagTransferRequest) types.DTagTransferRequest

RandomDTagTransferRequest picks and returns a random DTag transfer request from an array of requests

func RandomDTagTransferRequests

func RandomDTagTransferRequests(r *rand.Rand, requests []types.DTagTransferRequest) types.DTagTransferRequest

RandomDTagTransferRequests returns a new random DTag transfer request from the ones given

func RandomNickname

func RandomNickname(r *rand.Rand) string

RandomNickname return a random nickname

func RandomNicknameParams

func RandomNicknameParams(r *rand.Rand) types.NicknameParams

RandomNicknameParams return a random set of nickname params

func RandomOracleParams

func RandomOracleParams(r *rand.Rand) types.OracleParams

RandomOracleParams return a random oracle param

func RandomProfile

func RandomProfile(r *rand.Rand, accounts []*types.Profile) *types.Profile

RandomProfile picks and returns a random profile from an array

func RandomProfileCover

func RandomProfileCover(r *rand.Rand) string

RandomProfileCover return a random profile cover from the list of randomProfileCovers

func RandomProfilePic

func RandomProfilePic(r *rand.Rand) string

RandomProfilePic return a random profile pic value from the list of randomProfilePics given

func RandomRelationship

func RandomRelationship(r *rand.Rand, relationships []types.Relationship) types.Relationship

RandomRelationship picks and returns a random relationships from an array

func RandomSubspace

func RandomSubspace(r *rand.Rand) string

RandomSubspace returns a random post subspace from the above random subspaces

func RandomUserBlock

func RandomUserBlock(r *rand.Rand, userBlocks []types.UserBlock) types.UserBlock

RandomUserBlock picks and returns a random user block from an array

func RandomizedGenState

func RandomizedGenState(simsState *module.SimulationState)

RandomizedGenState generates a random GenesisState for profile

func SimulateMsgAcceptDTagTransfer

func SimulateMsgAcceptDTagTransfer(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgAcceptDTagTransfer tests and runs a single MsgAcceptDTagTransfer

func SimulateMsgBlockUser

func SimulateMsgBlockUser(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgBlockUser tests and runs a single msg block user

func SimulateMsgCancelDTagTransfer

func SimulateMsgCancelDTagTransfer(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgCancelDTagTransfer tests and runs a single MsgCancelDTagTransfer

func SimulateMsgCreateRelationship

func SimulateMsgCreateRelationship(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgCreateRelationship tests and runs a single msg create relationships

func SimulateMsgDeleteProfile

func SimulateMsgDeleteProfile(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgDeleteProfile tests and runs a single msg delete profile where the creator already exists

func SimulateMsgDeleteRelationship

func SimulateMsgDeleteRelationship(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgDeleteRelationship tests and runs a single msg delete relationships

func SimulateMsgRefuseDTagTransfer

func SimulateMsgRefuseDTagTransfer(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgRefuseDTagTransfer tests and runs a single MsgRefuseDTagTransfer

func SimulateMsgRequestDTagTransfer

func SimulateMsgRequestDTagTransfer(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgRequestDTagTransfer tests and runs a single MsgRequestDTagTransfer

func SimulateMsgSaveProfile

func SimulateMsgSaveProfile(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgSaveProfile tests and runs a single msg save profile where the creator already exists

func SimulateMsgUnblockUser

func SimulateMsgUnblockUser(
	k keeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgUnblockUser tests and runs a single msg unblock user

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