simulation

package
v5.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

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

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

View Source
var (
	Gas  = uint64(20000000)
	Fees = sdk.Coins{
		{
			Denom:  "stake",
			Amount: sdk.NewInt(0),
		},
	}
)

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 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) 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, sk types.StakingKeeper, 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) simtypes.ContentSimulatorFn

SimulateTallyWithLiquidStaking mocking tally for SetLiquidStakingVotingPowers.

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