simulation

package
v0.50.8-lsm Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 19 Imported by: 27

Documentation

Index

Constants

View Source
const (
	UnbondingTime             = "unbonding_time"
	MaxValidators             = "max_validators"
	HistoricalEntries         = "historical_entries"
	ValidatorBondFactor       = "validator_bond_factor"
	GlobalLiquidStakingCap    = "global_liquid_staking_cap"
	ValidatorLiquidStakingCap = "validator_liquid_staking_cap"
)

Simulation parameter constants

View Source
const (
	DefaultWeightMsgCreateValidator             int = 100
	DefaultWeightMsgEditValidator               int = 5
	DefaultWeightMsgDelegate                    int = 100
	DefaultWeightMsgUndelegate                  int = 100
	DefaultWeightMsgBeginRedelegate             int = 100
	DefaultWeightMsgCancelUnbondingDelegation   int = 100
	DefaultWeightMsgValidatorBond               int = 100
	DefaultWeightMsgTokenizeShares              int = 25
	DefaultWeightMsgRedeemTokensforShares       int = 25
	DefaultWeightMsgTransferTokenizeShareRecord int = 5
	DefaultWeightMsgEnableTokenizeShares        int = 1
	DefaultWeightMsgDisableTokenizeShares       int = 1

	OpWeightMsgCreateValidator             = "op_weight_msg_create_validator"
	OpWeightMsgEditValidator               = "op_weight_msg_edit_validator"
	OpWeightMsgDelegate                    = "op_weight_msg_delegate"
	OpWeightMsgUndelegate                  = "op_weight_msg_undelegate"
	OpWeightMsgBeginRedelegate             = "op_weight_msg_begin_redelegate"
	OpWeightMsgCancelUnbondingDelegation   = "op_weight_msg_cancel_unbonding_delegation"
	OpWeightMsgValidatorBond               = "op_weight_msg_validator_bond"
	OpWeightMsgTokenizeShares              = "op_weight_msg_tokenize_shares"
	OpWeightMsgRedeemTokensforShares       = "op_weight_msg_redeem_tokens_for_shares"
	OpWeightMsgTransferTokenizeShareRecord = "op_weight_msg_transfer_tokenize_share_record"
	OpWeightMsgDisableTokenizeShares       = "op_weight_msg_disable_tokenize_shares"
	OpWeightMsgEnableTokenizeShares        = "op_weight_msg_enable_tokenize_shares"
)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgUpdateParams int = 100

	OpWeightMsgUpdateParams = "op_weight_msg_update_params"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func NewDecodeStore

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

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 staking

func SimulateMsgBeginRedelegate

func SimulateMsgBeginRedelegate(
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k *keeper.Keeper,
) simtypes.Operation

SimulateMsgBeginRedelegate generates a MsgBeginRedelegate with random values

func SimulateMsgCancelUnbondingDelegate added in v0.46.0

func SimulateMsgCancelUnbondingDelegate(
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k *keeper.Keeper,
) simtypes.Operation

SimulateMsgCancelUnbondingDelegate generates a MsgCancelUnbondingDelegate with random values

func SimulateMsgCreateValidator

func SimulateMsgCreateValidator(
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k *keeper.Keeper,
) simtypes.Operation

SimulateMsgCreateValidator generates a MsgCreateValidator with random values

func SimulateMsgDelegate

func SimulateMsgDelegate(
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k *keeper.Keeper,
) simtypes.Operation

SimulateMsgDelegate generates a MsgDelegate with random values

func SimulateMsgDisableTokenizeShares

func SimulateMsgDisableTokenizeShares(txGen client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation

func SimulateMsgEditValidator

func SimulateMsgEditValidator(
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k *keeper.Keeper,
) simtypes.Operation

SimulateMsgEditValidator generates a MsgEditValidator with random values

func SimulateMsgEnableTokenizeShares

func SimulateMsgEnableTokenizeShares(txGen client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation

func SimulateMsgRedeemTokensforShares

func SimulateMsgRedeemTokensforShares(txGen client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation

SimulateMsgRedeemTokensforShares generates a MsgRedeemTokensforShares with random values

func SimulateMsgTokenizeShares

func SimulateMsgTokenizeShares(txGen client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation

SimulateMsgTokenizeShares generates a MsgTokenizeShares with random values

func SimulateMsgTransferTokenizeShareRecord

func SimulateMsgTransferTokenizeShareRecord(txGen client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper) simtypes.Operation

SimulateMsgTransferTokenizeShareRecord generates a MsgTransferTokenizeShareRecord with random values

func SimulateMsgUndelegate

func SimulateMsgUndelegate(
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k *keeper.Keeper,
) simtypes.Operation

SimulateMsgUndelegate generates a MsgUndelegate with random values

func SimulateMsgUpdateParams added in v0.47.0

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

SimulateMsgUpdateParams returns a random MsgUpdateParams

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