simulation

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgSaveProfile   = "op_weight_msg_save_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 NewRandomProfile

func NewRandomProfile(r *rand.Rand, account sdk.AccAddress) types.Profile

NewRandomProfile return a random ProfileData from random data and the given account

func ParamChanges

func ParamChanges(r *rand.Rand) []simulation.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) sdk.Int

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 moniker params

func RandomMoniker

func RandomMoniker(r *rand.Rand) *string

RandomMoniker return a random moniker

func RandomMonikerParams

func RandomMonikerParams(r *rand.Rand) types.MonikerParams

RandomMonikerParams return a random set of moniker params

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 RandomizedGenState

func RandomizedGenState(simsState *module.SimulationState)

RandomizedGenState generates a random GenesisState for profile

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 SimulateMsgSaveProfile

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

SimulateMsgSaveProfile tests and runs a single msg save 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

This section is empty.

Jump to

Keyboard shortcuts

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