Documentation ¶
Index ¶
- Constants
- Variables
- func GenDepositMinInitialDepositRatio(r *rand.Rand) sdk.Dec
- func GenDepositParamsDepositPeriod(r *rand.Rand) time.Duration
- func GenDepositParamsMinDeposit(r *rand.Rand) sdk.Coins
- func GenMinDepositRatio(r *rand.Rand) math.LegacyDec
- func GenTallyParamsQuorum(r *rand.Rand) math.LegacyDec
- func GenTallyParamsThreshold(r *rand.Rand) math.LegacyDec
- func GenTallyParamsVeto(r *rand.Rand) math.LegacyDec
- func GenVotingParamsVotingPeriod(r *rand.Rand) time.Duration
- func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string
- func ProposalContents() []simtypes.WeightedProposalContent
- func ProposalMsgs() []simtypes.WeightedProposalMsg
- func RandomizedGenState(simState *module.SimulationState)
- func SimulateLegacyTextProposalContent(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) simtypes.Content
- func SimulateMsgDeposit(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation
- func SimulateMsgSubmitLegacyProposal(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, ...) simtypes.Operation
- func SimulateMsgSubmitProposal(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, ...) simtypes.Operation
- func SimulateMsgVote(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation
- func SimulateMsgVoteWeighted(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation
- func SimulateTextProposal(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) sdk.Msg
- func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, ...) simulation.WeightedOperations
Constants ¶
const ( DepositParamsMinDeposit = "deposit_params_min_deposit" DepositParamsDepositPeriod = "deposit_params_deposit_period" DepositMinInitialRatio = "deposit_params_min_initial_ratio" VotingParamsVotingPeriod = "voting_params_voting_period" TallyParamsQuorum = "tally_params_quorum" TallyParamsThreshold = "tally_params_threshold" TallyParamsVeto = "tally_params_veto" // NOTE: backport from v50 MinDepositRatio = "min_deposit_ratio" )
Simulation parameter constants
const ( OpWeightMsgDeposit = "op_weight_msg_deposit" OpWeightMsgVote = "op_weight_msg_vote" OpWeightMsgVoteWeighted = "op_weight_msg_weighted_vote" DefaultWeightMsgDeposit = 100 DefaultWeightMsgVote = 67 DefaultWeightMsgVoteWeighted = 33 DefaultWeightTextProposal = 5 )
Simulation operation weights constants
const OpWeightSubmitTextProposal = "op_weight_submit_text_proposal"
OpWeightSubmitTextProposal app params key for text proposal
Variables ¶
var ( TypeMsgDeposit = sdk.MsgTypeURL(&v1.MsgDeposit{}) TypeMsgVote = sdk.MsgTypeURL(&v1.MsgVote{}) TypeMsgVoteWeighted = sdk.MsgTypeURL(&v1.MsgVoteWeighted{}) TypeMsgSubmitProposal = sdk.MsgTypeURL(&v1.MsgSubmitProposal{}) )
Governance message types and routes
Functions ¶
func GenDepositMinInitialDepositRatio ¶ added in v0.47.0
GenDepositMinInitialRatio returns randomized DepositMinInitialRatio
func GenDepositParamsDepositPeriod ¶
GenDepositParamsDepositPeriod returns randomized DepositParamsDepositPeriod
func GenDepositParamsMinDeposit ¶
GenDepositParamsMinDeposit returns randomized DepositParamsMinDeposit
func GenMinDepositRatio ¶ added in v0.50.1
GenMinDepositRatio returns randomized DepositMinRatio
func GenTallyParamsQuorum ¶
GenTallyParamsQuorum returns randomized TallyParamsQuorum
func GenTallyParamsThreshold ¶
GenTallyParamsThreshold returns randomized TallyParamsThreshold
func GenTallyParamsVeto ¶
GenTallyParamsVeto returns randomized TallyParamsVeto
func GenVotingParamsVotingPeriod ¶
GenVotingParamsVotingPeriod returns randomized VotingParamsVotingPeriod
func NewDecodeStore ¶
NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding gov type.
func ProposalContents ¶
func ProposalContents() []simtypes.WeightedProposalContent
ProposalContents defines the module weighted proposals' contents
func ProposalMsgs ¶ added in v0.47.0
func ProposalMsgs() []simtypes.WeightedProposalMsg
ProposalMsgs defines the module weighted proposals' contents
func RandomizedGenState ¶
func RandomizedGenState(simState *module.SimulationState)
RandomizedGenState generates a random GenesisState for gov
func SimulateLegacyTextProposalContent ¶ added in v0.47.0
func SimulateLegacyTextProposalContent(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) simtypes.Content
SimulateTextProposalContent returns a random text proposal content.
func SimulateMsgDeposit ¶
func SimulateMsgDeposit(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation
SimulateMsgDeposit generates a MsgDeposit with random values.
func SimulateMsgSubmitLegacyProposal ¶ added in v0.47.0
func SimulateMsgSubmitLegacyProposal(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, contentSim simtypes.ContentSimulatorFn) simtypes.Operation
SimulateMsgSubmitLegacyProposal simulates creating a msg Submit Proposal voting on the proposal, and subsequently slashing the proposal. It is implemented using future operations.
func SimulateMsgSubmitProposal ¶ added in v0.24.0
func SimulateMsgSubmitProposal(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, msgSim simtypes.MsgSimulatorFn) 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 ¶
func SimulateMsgVote(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation
SimulateMsgVote generates a MsgVote with random values.
func SimulateMsgVoteWeighted ¶ added in v0.43.0
func SimulateMsgVoteWeighted(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation
SimulateMsgVoteWeighted generates a MsgVoteWeighted with random values.
func SimulateTextProposal ¶ added in v0.47.0
SimulateTextProposal returns a random text proposal content. A text proposal is a proposal that contains no msgs.
func WeightedOperations ¶
func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, wMsgs []simtypes.WeightedProposalMsg, wContents []simtypes.WeightedProposalContent) simulation.WeightedOperations
WeightedOperations returns all the operations from the module with their respective weights
Types ¶
This section is empty.