simulation

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgCreateProfile = "op_weight_msg_create_profile"
	OpWeightMsgEditProfile   = "op_weight_msg_edit_profile"
	OpWeightMsgDeleteProfile = "op_weight_msg_delete_profile"

	DefaultGasValue = 200000
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func DecodeStore

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

DecodeStore unmarshals the KVPair's Value to the corresponding profile type

func GetSimAccount

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

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

func RandomBio

func RandomBio(r *rand.Rand) string

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

func RandomMoniker

func RandomMoniker(r *rand.Rand) string

RandomMoniker return a random moniker from the randomMonikers list given

func RandomName

func RandomName(r *rand.Rand) string

RandomName return a random name value from the list of randomNames given

func RandomProfile

func RandomProfile(r *rand.Rand, accounts types.Profiles) 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 RandomSurname

func RandomSurname(r *rand.Rand) string

RandomSurname return a random surname value from the list of randomSurnames given

func RandomizedGenState

func RandomizedGenState(simsState *module.SimulationState)

RandomizedGenState generates a random GenesisState for auth

func SimulateMsgCreateProfile

func SimulateMsgCreateProfile(ak auth.AccountKeeper) sim.Operation

SimulateMsgCreateProfile tests and runs a single msg create profile where the creator already exists nolint: funlen

func SimulateMsgDeleteProfile

func SimulateMsgDeleteProfile(k keeper.Keeper, ak auth.AccountKeeper) sim.Operation

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

func SimulateMsgEditProfile

func SimulateMsgEditProfile(k keeper.Keeper, ak auth.AccountKeeper) sim.Operation

SimulateMsgEditProfile tests and runs a single msg edit profile where the creator already exists nolint: funlen

func WeightedOperations

func WeightedOperations(appParams sim.AppParams, cdc *codec.Codec, k keeper.Keeper, ak auth.AccountKeeper) sim.WeightedOperations

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

Types

type ProfileData

type ProfileData struct {
	Moniker string
	Name    string
	Surname string
	Bio     string
	Picture types.Pictures
	Creator sim.Account
}

ProfileData contains the randomly generated data of an profile

func RandomProfileData

func RandomProfileData(r *rand.Rand, accs []sim.Account) ProfileData

RandomProfileData return a random ProfileData from random data and random accounts list

Jump to

Keyboard shortcuts

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