simulation

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: Apache-2.0 Imports: 16 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 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