simulation

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgLiquidStake   = "op_weight_msg_liquid_stake"
	OpWeightMsgLiquidUnstake = "op_weight_msg_liquid_unstake"
	LiquidStakingGas         = 20000000
)

Simulation operation weights constants.

View Source
const (
	OpWeightSimulateAddWhitelistValidatorsProposal    = "op_weight_add_whitelist_validators_proposal"
	OpWeightSimulateUpdateWhitelistValidatorsProposal = "op_weight_update_whitelist_validators_proposal"
	OpWeightSimulateDeleteWhitelistValidatorsProposal = "op_weight_delete_whitelist_validators_proposal"
	OpWeightCompleteRedelegationUnbonding             = "op_weight_complete_redelegation_unbonding"
	OpWeightTallyWithLiquidStaking                    = "op_weight_tally_with_liquid_staking"
	MaxWhitelistValidators                            = 10
)

Simulation operation weights constants.

Variables

This section is empty.

Functions

func GenAndDeliverTx

GenAndDeliverTx generates a transactions and delivers it.

func GenAndDeliverTxWithRandFees

func GenAndDeliverTxWithRandFees(txCtx simulation.OperationInput, gas uint64) (simtypes.OperationMsg, []simtypes.FutureOperation, error)

GenAndDeliverTxWithRandFees generates a transaction with a random fee and delivers it.

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

func ParamChanges

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

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

func ProposalContents

ProposalContents defines the module weighted proposals' contents for mocking param changes, other actions with keeper

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for liquidstaking.

func SimulateAddWhitelistValidatorsProposal

func SimulateAddWhitelistValidatorsProposal(sk types.StakingKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn

SimulateAddWhitelistValidatorsProposal generates random add whitelisted validator param change proposal content.

func SimulateCompleteRedelegationUnbonding

func SimulateCompleteRedelegationUnbonding(sk types.StakingKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn

SimulateCompleteRedelegationUnbonding mocking complete redelegations, unbondings by BlockValidatorUpdates of staking keeper.

func SimulateDeleteWhitelistValidatorsProposal

func SimulateDeleteWhitelistValidatorsProposal(sk types.StakingKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn

SimulateDeleteWhitelistValidatorsProposal generates random delete whitelisted validator param change proposal content.

func SimulateMsgLiquidStake

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

SimulateMsgLiquidStake generates a MsgStake with random values nolint: interfacer

func SimulateMsgLiquidUnstake

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

SimulateMsgLiquidUnstake generates a SimulateMsgLiquidUnstake with random values nolint: interfacer

func SimulateTallyWithLiquidStaking

func SimulateTallyWithLiquidStaking(ak types.AccountKeeper, bk types.BankKeeper, gk types.GovKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn

SimulateTallyWithLiquidStaking mocking tally for TallyLiquidStakingGov.

func SimulateUpdateWhitelistValidatorsProposal

func SimulateUpdateWhitelistValidatorsProposal(sk types.StakingKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn

SimulateUpdateWhitelistValidatorsProposal generates random update whitelisted validator param change proposal content.

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