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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTickSpacing        = "default_tick_spacing"
	MaxNumPrivateFarmingPlans = "max_num_private_farming_plans"
	MaxFarmingBlockTime       = "max_farming_block_time"
)

Simulation parameter constants

View Source
const (
	OpWeightMsgCreatePool      = "op_weight_msg_create_pool"
	OpWeightMsgAddLiquidity    = "op_weight_msg_add_liquidity"
	OpWeightMsgRemoveLiquidity = "op_weight_msg_remove_liquidity"
	OpWeightMsgCollect         = "op_weight_msg_collect"

	DefaultWeightMsgCreatePool      = 5
	DefaultWeightMsgAddLiquidity    = 70
	DefaultWeightMsgRemoveLiquidity = 50
	DefaultWeightMsgCollect         = 50
)

Simulation operation weights constants.

View Source
const (
	OpWeightSubmitPoolParameterChangeProposal = "op_weight_submit_pool_parameter_change_proposal"
	OpWeightSubmitPublicFarmingPlanProposal   = "op_weight_submit_public_farming_plan_proposal"

	DefaultWeightPoolParameterChangeProposal = 5
	DefaultWeightPublicFarmingPlanProposal   = 5
)

Variables

This section is empty.

Functions

func GenDefaultTickSpacing

func GenDefaultTickSpacing(r *rand.Rand) uint32

func GenMaxFarmingBlockTime

func GenMaxFarmingBlockTime(r *rand.Rand) time.Duration

func GenMaxNumPrivateFarmingPlans

func GenMaxNumPrivateFarmingPlans(r *rand.Rand) uint32

func NewDecodeStore

func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string

func ParamChanges

func ParamChanges(_ *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

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the module.

func SimulateMsgAddLiquidity

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

func SimulateMsgRemoveLiquidity

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

func SimulatePoolParameterChangeProposal

func SimulatePoolParameterChangeProposal(k keeper.Keeper) simtypes.ContentSimulatorFn

func SimulatePublicFarmingPlanProposal

func SimulatePublicFarmingPlanProposal(bk types.BankKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn

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