simulation

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DepositParamsMinDeposit    = "deposit_params_min_deposit"
	DepositParamsDepositPeriod = "deposit_params_deposit_period"
	VotingParamsVotingPeriod   = "voting_params_voting_period"
	TallyParamsQuorum          = "tally_params_quorum"
	TallyParamsThreshold       = "tally_params_threshold"
	TallyParamsVeto            = "tally_params_veto"
)

Simulation parameter constants

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

Simulation operation weights constants

View Source
const OpWeightSubmitTextProposal = "op_weight_submit_text_proposal"

OpWeightSubmitTextProposal app params key for text proposal

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 GenDepositParamsDepositPeriod

func GenDepositParamsDepositPeriod(r *rand.Rand) time.Duration

GenDepositParamsDepositPeriod randomized DepositParamsDepositPeriod

func GenDepositParamsMinDeposit

func GenDepositParamsMinDeposit(r *rand.Rand) sdk.Coins

GenDepositParamsMinDeposit randomized DepositParamsMinDeposit

func GenTallyParamsQuorum

func GenTallyParamsQuorum(r *rand.Rand) sdk.Dec

GenTallyParamsQuorum randomized TallyParamsQuorum

func GenTallyParamsThreshold

func GenTallyParamsThreshold(r *rand.Rand) sdk.Dec

GenTallyParamsThreshold randomized TallyParamsThreshold

func GenTallyParamsVeto

func GenTallyParamsVeto(r *rand.Rand) sdk.Dec

GenTallyParamsVeto randomized TallyParamsVeto

func GenVotingParamsVotingPeriod

func GenVotingParamsVotingPeriod(r *rand.Rand) time.Duration

GenVotingParamsVotingPeriod randomized VotingParamsVotingPeriod

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 ProposalContents

func ProposalContents() []simulation.WeightedProposalContent

ProposalContents defines the module weighted proposals' contents

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for gov

func SimulateMsgDeposit

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

SimulateMsgDeposit generates a MsgDeposit with random values. nolint: funlen

func SimulateMsgVote

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

SimulateMsgVote generates a MsgVote with random values. nolint: funlen

func SimulateSubmitProposal

func SimulateSubmitProposal(
	ak types.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. nolint: funlen

func SimulateTextProposalContent

func SimulateTextProposalContent(r *rand.Rand, _ sdk.Context, _ []simulation.Account) types.Content

SimulateTextProposalContent returns a random text proposal content.

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