simulation

package
v0.44.30 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

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"
	OpWeightMsgVoteWeighted = "op_weight_msg_weighted_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 GenDepositParamsDepositPeriod added in v0.44.4

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

GenDepositParamsDepositPeriod randomized DepositParamsDepositPeriod

func GenDepositParamsMinDeposit added in v0.44.4

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

GenDepositParamsMinDeposit randomized DepositParamsMinDeposit

func GenTallyParamsQuorum added in v0.44.4

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

GenTallyParamsQuorum randomized TallyParamsQuorum

func GenTallyParamsThreshold added in v0.44.4

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

GenTallyParamsThreshold randomized TallyParamsThreshold

func GenTallyParamsVeto added in v0.44.4

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

GenTallyParamsVeto randomized TallyParamsVeto

func GenVotingParamsVotingPeriod added in v0.44.4

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

GenVotingParamsVotingPeriod randomized VotingParamsVotingPeriod

func NewDecodeStore added in v0.44.4

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

NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding gov type.

func ParamChanges added in v0.44.4

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

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

func ProposalContents added in v0.44.4

func ProposalContents() []simtypes.WeightedProposalContent

ProposalContents defines the module weighted proposals' contents

func RandomizedGenState added in v0.44.4

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for gov

func SimulateMsgDeposit

func SimulateMsgDeposit(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgDeposit generates a MsgDeposit with random values.

func SimulateMsgSubmitProposal

func SimulateMsgSubmitProposal(
	ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, contentSim simtypes.ContentSimulatorFn,
) simtypes.Operation

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

func SimulateMsgVote

SimulateMsgVote generates a MsgVote with random values.

func SimulateMsgVoteWeighted added in v0.44.4

func SimulateMsgVoteWeighted(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgVoteWeighted generates a MsgVoteWeighted with random values.

func SimulateTextProposalContent added in v0.44.4

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

SimulateTextProposalContent returns a random text proposal content.

func WeightedOperations added in v0.44.4

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