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: 15 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 (
	CommunityTax        = "community_tax"
	BaseProposerReward  = "base_proposer_reward"
	BonusProposerReward = "bonus_proposer_reward"
	WithdrawEnabled     = "withdraw_enabled"
)

Simulation parameter constants

View Source
const (
	OpWeightMsgSetWithdrawAddress          = "op_weight_msg_set_withdraw_address"
	OpWeightMsgWithdrawDelegationReward    = "op_weight_msg_withdraw_delegation_reward"
	OpWeightMsgWithdrawValidatorCommission = "op_weight_msg_withdraw_validator_commission"
	OpWeightMsgFundCommunityPool           = "op_weight_msg_fund_community_pool"
)

Simulation operation weights constants

View Source
const OpWeightSubmitCommunitySpendProposal = "op_weight_submit_community_spend_proposal"

OpWeightSubmitCommunitySpendProposal app params key for community spend 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 distribution type

func GenBaseProposerReward

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

GenBaseProposerReward randomized BaseProposerReward

func GenBonusProposerReward

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

GenBonusProposerReward randomized BonusProposerReward

func GenCommunityTax

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

GenCommunityTax randomized CommunityTax

func GenWithdrawEnabled

func GenWithdrawEnabled(r *rand.Rand) bool

GenWithdrawEnabled returns a randomized WithdrawEnabled parameter.

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(k keeper.Keeper) []simulation.WeightedProposalContent

ProposalContents defines the module weighted proposals' contents

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for distribution

func SimulateCommunityPoolSpendProposalContent

func SimulateCommunityPoolSpendProposalContent(k keeper.Keeper) simulation.ContentSimulatorFn

SimulateCommunityPoolSpendProposalContent generates random community-pool-spend proposal content nolint: funlen

func SimulateMsgFundCommunityPool

func SimulateMsgFundCommunityPool(ak types.AccountKeeper, k keeper.Keeper, sk stakingkeeper.Keeper) simulation.Operation

SimulateMsgFundCommunityPool simulates MsgFundCommunityPool execution where a random account sends a random amount of its funds to the community pool.

func SimulateMsgSetWithdrawAddress

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

SimulateMsgSetWithdrawAddress generates a MsgSetWithdrawAddress with random values. nolint: funlen

func SimulateMsgWithdrawDelegatorReward

func SimulateMsgWithdrawDelegatorReward(ak types.AccountKeeper, k keeper.Keeper, sk stakingkeeper.Keeper) simulation.Operation

SimulateMsgWithdrawDelegatorReward generates a MsgWithdrawDelegatorReward with random values. nolint: funlen

func SimulateMsgWithdrawValidatorCommission

func SimulateMsgWithdrawValidatorCommission(ak types.AccountKeeper, k keeper.Keeper, sk stakingkeeper.Keeper) simulation.Operation

SimulateMsgWithdrawValidatorCommission generates a MsgWithdrawValidatorCommission with random values. nolint: funlen

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