simulation

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightBuyTickets = "op_weight_buy_tickets"
	DefaultGasValue    = 200000
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func NewDecodeStore

func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string

NewDecodeStore returns a new decoder that unmarshals the KVPair's Value to the corresponding relationships type

func ParamChanges

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

ParamChanges returns a randomly generated set or parameter changes

func RandCoin added in v0.1.1

func RandCoin(r *rand.Rand, amountLimit int64) sdk.Coin

func RandDate

func RandDate(r *rand.Rand, max time.Time) time.Time

RandDate generates a new Date that does not exceed the one set

func RandHexString

func RandHexString(r *rand.Rand, length int) string

RandHexString generates a random hex string of given length

func RandHistoricalDrawData

func RandHistoricalDrawData(r *rand.Rand, accounts []simtypes.Account) types.HistoricalDrawData

RandHistoricalDrawData returns a randomly generated HistoricalDrawData

func RandHistoricalDrawsData

func RandHistoricalDrawsData(r *rand.Rand, length int, accounts []simtypes.Account) []types.HistoricalDrawData

RandHistoricalDrawsData returns a randomly generated slice of types.HistoricalDrawData of the given length

func RandTicket

func RandTicket(r *rand.Rand, owner string) types.Ticket

RandTicket generates a random ticket for the given address

func RandTicketsSlice

func RandTicketsSlice(r *rand.Rand, length int, accounts []simtypes.Account) []types.Ticket

RandTicketsSlice generates a slice of random tickets of the given length

func RandomDistributionParams added in v0.1.1

func RandomDistributionParams(r *rand.Rand) types.DistributionParams

RandomDistributionParams returns a randomly generated DistributionParams

func RandomDraw

func RandomDraw(r *rand.Rand, limitTime time.Time) types.Draw

RandomDraw generates a new random types.Draw object that has an ending not going above the limit provided

func RandomDrawParams added in v0.1.1

func RandomDrawParams(r *rand.Rand) types.DrawParams

RandomDrawParams returns a randomly generated DrawParams

func RandomTicketParams added in v0.1.1

func RandomTicketParams(r *rand.Rand) types.TicketParams

RandomTicketParams returns a randomly generated TicketParams

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState sets into the given simState a randomly generated genesis state

func SimulateMsgBuyTickets

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

SimulateMsgBuyTickets generates a random types.MsgBuyTickets and sends it to the chain.

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