simulation

package
v0.48.86 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommunityTax    = "community_tax"
	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"

	DefaultWeightMsgSetWithdrawAddress          int = 50
	DefaultWeightMsgWithdrawDelegationReward    int = 50
	DefaultWeightMsgWithdrawValidatorCommission int = 50
	DefaultWeightMsgFundCommunityPool           int = 50
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func GenCommunityTax added in v0.48.84

func GenCommunityTax(r *rand.Rand) math.LegacyDec

GenCommunityTax randomized CommunityTax

func GenWithdrawEnabled added in v0.48.84

func GenWithdrawEnabled(r *rand.Rand) bool

GenWithdrawEnabled returns a randomized WithdrawEnabled parameter.

func NewDecodeStore added in v0.48.84

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 distribution type.

func ParamChanges added in v0.48.84

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

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

func RandomizedGenState added in v0.48.84

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for distribution

func SimulateMsgFundCommunityPool added in v0.48.84

func SimulateMsgFundCommunityPool(txConfig client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, sk types.StakingKeeper) simtypes.Operation

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

func SimulateMsgSetWithdrawAddress

func SimulateMsgSetWithdrawAddress(txConfig client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgSetWithdrawAddress generates a MsgSetWithdrawAddress with random values.

func SimulateMsgWithdrawDelegatorReward

func SimulateMsgWithdrawDelegatorReward(txConfig client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, sk types.StakingKeeper) simtypes.Operation

SimulateMsgWithdrawDelegatorReward generates a MsgWithdrawDelegatorReward with random values.

func SimulateMsgWithdrawValidatorCommission added in v0.30.0

func SimulateMsgWithdrawValidatorCommission(txConfig client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, sk types.StakingKeeper) simtypes.Operation

SimulateMsgWithdrawValidatorCommission generates a MsgWithdrawValidatorCommission with random values.

func WeightedOperations added in v0.48.84

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