simulation

package
v0.0.0-...-bfbef28 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PoolCreationFee    = "pool_creation_fee"
	MaxRewardCategoryN = "max_reward_category_n"
)
View Source
const (
	OpWeightMsgCreatePool  = "op_weight_msg_create_pool"
	OpWeightMsgAdjustPool  = "op_weight_msg_adjust_pool"
	OpWeightMsgStake       = "op_weight_msg_stake"
	OpWeightMsgUnStake     = "op_weight_msg_unStake"
	OpWeightMsgHarvest     = "op_weight_msg_harvest"
	OpWeightMsgDestroyPool = "op_weight_msg_destroy_pool"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func GenAppendReward

func GenAppendReward(
	r *rand.Rand,
	rules types.RewardRules,
	spendable sdk.Coins,
) (sdk.Coins, error)

GenAppendReward randomized appendReward

func GenDescription

func GenDescription(r *rand.Rand) string

GenDescription randomized editable

func GenDestructible

func GenDestructible(r *rand.Rand) bool

GenDestructible randomized editable

func GenLpToken

func GenLpToken(r *rand.Rand, spendableCoin sdk.Coins) (sdk.Coin, error)

GenLpToken randomized lpToken

func GenRewardPerBlock

func GenRewardPerBlock(r *rand.Rand, coin sdk.Coin) (sdk.Coin, error)

GenRewardPerBlock randomized rewardPerBlock

func GenRewardRule

func GenRewardRule(r *rand.Rand, rules types.RewardRules) types.RewardRule

GenRewardRule randomized rewardRule

func GenStake

func GenStake(r *rand.Rand, pool types.FarmPool, spendable sdk.Coins) (sdk.Coin, error)

GenStake randomized stake

func GenStartHeight

func GenStartHeight(r *rand.Rand, ctx sdk.Context) int64

GenStartHeight randomized startHeight

func GenTotalReward

func GenTotalReward(r *rand.Rand, spendableCoin sdk.Coins) (sdk.Coin, error)

GenTotalReward randomized totalReward

func GenUnStake

func GenUnStake(r *rand.Rand, pool types.FarmPool, info types.FarmInfo) (sdk.Coin, error)

GenUnStake randomized unStake

func NewDecodeStore

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

NewDecodeStore unmarshals the KVPair's Value to the corresponding slashing type

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for farm

func SimulateMsgAdjustPool

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

SimulateMsgAdjustPool simulates MsgAdjustPool

func SimulateMsgCreatePool

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

SimulateMsgCreatePool randomized CreatePool

func SimulateMsgDestroyPool

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

SimulateMsgDestroyPool simulates MsgDestroyPool

func SimulateMsgHarvest

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

SimulateMsgHarvest simulates MsgHarvest

func SimulateMsgStake

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

SimulateMsgStake simulates MsgStake

func SimulateMsgUnStake

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

SimulateMsgUnStake simulates MsgUnStake

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