simulation

package
v0.0.0-...-f2ae4c7 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgDeposit = "op_weight_msg_deposit"
	OpWeightMsgVote    = "op_weight_msg_vote"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func DecodeStore

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

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

func GenerateACoin

func GenerateACoin(r *rand.Rand) sdk.Coin

GenerateACoin returns a Coin object with all of its fields randomized.

func GenerateADepositParams

func GenerateADepositParams(r *rand.Rand) types.DepositParams

GenerateADepositParams returns a DepositParams object with all of its fields randomized.

func GenerateATallyParams

func GenerateATallyParams(r *rand.Rand) govTypes.TallyParams

GenerateATallyParams returns a TallyParams object with all of its fields randomized.

func GenerateAVotingParams

func GenerateAVotingParams(r *rand.Rand) govTypes.VotingParams

GenerateAVotingParams returns a VotingParams object with all of its fields randomized.

func GenerateTallyParams

func GenerateTallyParams(r *rand.Rand) types.TallyParams

GenerateTallyParams returns a TallyParams object with all of its fields randomized.

func ParamChanges

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

ParamChanges defines the parameters that can be modified by param change proposals on the simulation

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState creates a randomGenesis state for module simulation.

func SimulateMsgDeposit

func SimulateMsgDeposit(ak govTypes.AccountKeeper, k keeper.Keeper) simulation.Operation

SimulateMsgDeposit generates a MsgDeposit with random values.

func SimulateMsgVote

func SimulateMsgVote(ak govTypes.AccountKeeper, k keeper.Keeper) simulation.Operation

SimulateMsgVote generates a MsgVote with random values.

func SimulateSubmitProposal

func SimulateSubmitProposal(
	ak govTypes.AccountKeeper, k keeper.Keeper, contentSim simulation.ContentSimulatorFn,
) simulation.Operation

SimulateSubmitProposal simulates creating a msg Submit Proposal voting on the proposal, and subsequently slashing the proposal. It is implemented using future operations.

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