simulation

package
v5.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PrivatePlanCreationFee = "private_plan_creation_fee"
	NextEpochDays          = "next_epoch_days"
	FarmingFeeCollector    = "farming_fee_collector"
	CurrentEpochDays       = "current_epoch_days"
	MaxNumPrivatePlans     = "max_num_private_plans"
)

Simulation parameter constants.

View Source
const (
	OpWeightMsgCreateFixedAmountPlan = "op_weight_msg_create_fixed_amount_plan"
	OpWeightMsgCreateRatioPlan       = "op_weight_msg_create_ratio_plan"
	OpWeightMsgStake                 = "op_weight_msg_stake"
	OpWeightMsgUnstake               = "op_weight_msg_unstake"
	OpWeightMsgHarvest               = "op_weight_msg_harvest"
	OpWeightMsgRemovePlan            = "op_weight_msg_remove_plan"
)

Simulation operation weights constants.

View Source
const (
	OpWeightSimulateAddPublicPlanProposal    = "op_weight_add_public_plan_proposal"
	OpWeightSimulateUpdatePublicPlanProposal = "op_weight_update_public_plan_proposal"
	OpWeightSimulateDeletePublicPlanProposal = "op_weight_delete_public_plan_proposal"
)

Simulation operation weights constants.

Variables

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

Functions

func GenCurrentEpochDays

func GenCurrentEpochDays(r *rand.Rand) uint32

GenCurrentEpochDays returns current epoch days.

func GenFarmingFeeCollector

func GenFarmingFeeCollector(r *rand.Rand) string

GenFarmingFeeCollector returns default farming fee collector.

func GenMaxNumPrivatePlans

func GenMaxNumPrivatePlans(r *rand.Rand) uint32

GenMaxNumPrivatePlans returns a randomized value for MaxNumPrivatePlans param.

func GenNextEpochDays

func GenNextEpochDays(r *rand.Rand) uint32

GenNextEpochDays return default next epoch days.

func GenPrivatePlanCreationFee

func GenPrivatePlanCreationFee(r *rand.Rand) sdk.Coins

GenPrivatePlanCreationFee return randomized private plan creation fee.

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 farming 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

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for farming.

func SimulateAddPublicPlanProposal

func SimulateAddPublicPlanProposal(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn

SimulateAddPublicPlanProposal generates random public add plan proposal content.

func SimulateDeletePublicPlanProposal

func SimulateDeletePublicPlanProposal(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn

SimulateDeletePublicPlanProposal generates random public delete plan proposal content.

func SimulateModifyPublicPlanProposal

func SimulateModifyPublicPlanProposal(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn

SimulateModifyPublicPlanProposal generates random public modify plan proposal content.

func SimulateMsgCreateFixedAmountPlan

func SimulateMsgCreateFixedAmountPlan(ak farmingtypes.AccountKeeper, bk farmingtypes.BankKeeper, k farmingkeeper.Keeper) simtypes.Operation

SimulateMsgCreateFixedAmountPlan generates a MsgCreateFixedAmountPlan with random values nolint: interfacer

func SimulateMsgCreateRatioPlan

SimulateMsgCreateRatioPlan generates a MsgCreateRatioPlan with random values nolint: interfacer

func SimulateMsgHarvest

SimulateMsgHarvest generates a MsgHarvest with random values nolint: interfacer

func SimulateMsgRemovePlan

SimulateMsgRemovePlan generates a MsgRemovePlan with random values

func SimulateMsgStake

SimulateMsgStake generates a MsgStake with random values nolint: interfacer

func SimulateMsgUnstake

SimulateMsgUnstake generates a SimulateMsgUnstake with random values nolint: interfacer

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