cosmos-sdk: Index | Files

package simulation

import ""


Package Files

decoder.go genesis.go operations.go params.go proposals.go


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

const (
    OpWeightMsgDeposit = "op_weight_msg_deposit"
    OpWeightMsgVote    = "op_weight_msg_vote"

Simulation operation weights constants

const OpWeightSubmitTextProposal = "op_weight_submit_text_proposal"

OpWeightSubmitTextProposal app params key for text proposal

func GenDepositParamsDepositPeriod Uses

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

GenDepositParamsDepositPeriod randomized DepositParamsDepositPeriod

func GenDepositParamsMinDeposit Uses

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

GenDepositParamsMinDeposit randomized DepositParamsMinDeposit

func GenTallyParamsQuorum Uses

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

GenTallyParamsQuorum randomized TallyParamsQuorum

func GenTallyParamsThreshold Uses

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

GenTallyParamsThreshold randomized TallyParamsThreshold

func GenTallyParamsVeto Uses

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

GenTallyParamsVeto randomized TallyParamsVeto

func GenVotingParamsVotingPeriod Uses

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

GenVotingParamsVotingPeriod randomized VotingParamsVotingPeriod

func NewDecodeStore Uses

func NewDecodeStore(cdc codec.Marshaler) 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 Uses

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

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

func ProposalContents Uses

func ProposalContents() []simtypes.WeightedProposalContent

ProposalContents defines the module weighted proposals' contents

func RandomizedGenState Uses

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for gov

func SimulateMsgDeposit Uses

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

SimulateMsgDeposit generates a MsgDeposit with random values.

func SimulateMsgSubmitProposal Uses

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

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

func SimulateMsgVote Uses

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

SimulateMsgVote generates a MsgVote with random values.

func SimulateTextProposalContent Uses

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

SimulateTextProposalContent returns a random text proposal content.

func WeightedOperations Uses

func WeightedOperations(
    appParams simtypes.AppParams, cdc codec.JSONMarshaler, ak types.AccountKeeper,
    bk types.BankKeeper, k keeper.Keeper, wContents []simtypes.WeightedProposalContent,
) simulation.WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Package simulation imports 18 packages (graph) and is imported by 2 packages. Updated 2020-08-13. Refresh now. Tools for package owners.