simulation

package
v0.48.0-ramus1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 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"       //nolint:gosec
	OpWeightMsgVote         = "op_weight_msg_vote"          //nolint:gosec
	OpWeightMsgVoteWeighted = "op_weight_msg_weighted_vote" //nolint:gosec
)

nolint:gosec 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.47.0

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

GenDepositParamsDepositPeriod randomized DepositParamsDepositPeriod

func GenDepositParamsMinDeposit added in v0.47.0

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

GenDepositParamsMinDeposit randomized DepositParamsMinDeposit

func GenTallyParamsQuorum added in v0.47.0

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

GenTallyParamsQuorum randomized TallyParamsQuorum

func GenTallyParamsThreshold added in v0.47.0

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

GenTallyParamsThreshold randomized TallyParamsThreshold

func GenTallyParamsVeto added in v0.47.0

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

GenTallyParamsVeto randomized TallyParamsVeto

func GenVotingParamsVotingPeriod added in v0.47.0

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

GenVotingParamsVotingPeriod randomized VotingParamsVotingPeriod

func NewDecodeStore added in v0.47.0

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.47.0

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.47.0

func ProposalContents() []simtypes.WeightedProposalContent

ProposalContents defines the module weighted proposals' contents

func RandomizedGenState added in v0.47.0

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.47.0

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.47.0

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

SimulateTextProposalContent returns a random text proposal content.

func WeightedOperations added in v0.47.0

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