simulation

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWeightMsgCreateRewardsPlan          int = 80
	DefaultWeightMsgEditRewardsPlan            int = 40
	DefaultWeightMsgSetWithdrawAddress         int = 20
	DefaultWeightMsgWithdrawDelegatorReward    int = 30
	DefaultWeightMsgWithdrawOperatorCommission int = 10

	OperationWeightMsgCreateRewardsPlan          = "op_weight_msg_create_rewards_plan"
	OperationWeightMsgEditRewardsPlan            = "op_weight_msg_edit_rewards_plan"
	OperationWeightMsgSetWithdrawAddress         = "op_weight_msg_set_withdraw_address"
	OperationWeightMsgWithdrawDelegatorReward    = "op_weight_msg_withdraw_delegator_reward"
	OperationWeightMsgWithdrawOperatorCommission = "op_weight_msg_withdraw_operator_commission"
)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgUpdateParams = 30

	OperationWeightMsgUpdateParams = "op_weight_msg_update_params"
)

Variables

This section is empty.

Functions

func GetRandomExistingRewardsPlan

func GetRandomExistingRewardsPlan(r *rand.Rand, ctx sdk.Context, k *keeper.Keeper) (types.RewardsPlan, bool)

func ProposalMsgs

func ProposalMsgs(bankKeeper bankkeeper.Keeper) []simtypes.WeightedProposalMsg

func RandomCurrentRewardsRecords

func RandomCurrentRewardsRecords(
	r *rand.Rand,
	servicesGenesis servicestypes.GenesisState,
	availableDenoms []string,
) []types.CurrentRewardsRecord

func RandomDecPools

func RandomDecPools(r *rand.Rand, availableDenoms []string) types.DecPools

func RandomDelegatorStartingInfoRecords

func RandomDelegatorStartingInfoRecords(
	r *rand.Rand,
	availableDenoms []string,
) []types.DelegatorStartingInfoRecord

func RandomDelegatorWithdrawInfos

func RandomDelegatorWithdrawInfos(r *rand.Rand, accs []simtypes.Account) []types.DelegatorWithdrawInfo

func RandomDistribution

func RandomDistribution(
	r *rand.Rand,
	delegationType restakingtypes.DelegationType,
	target restakingtypes.DelegationTarget,
) types.Distribution

func RandomDistributionType

func RandomDistributionType(r *rand.Rand) types.DistributionType

func RandomOperatorAccumulatedCommissionRecords

func RandomOperatorAccumulatedCommissionRecords(
	r *rand.Rand,
	operators []operatorstypes.Operator,
	availableDenoms []string,
) []types.OperatorAccumulatedCommissionRecord

func RandomParams

func RandomParams(r *rand.Rand, rewardsPlanCreationFeeDenoms []string) types.Params

func RandomPoolServiceTotalDelegatorShares

func RandomPoolServiceTotalDelegatorShares(
	r *rand.Rand,
	poolsGenesis poolstypes.GenesisState,
	servicesGenesis servicestypes.GenesisState,
	availableDenoms []string,
) []types.PoolServiceTotalDelegatorShares

func RandomRewardsPlan

func RandomRewardsPlan(
	r *rand.Rand,
	serviceID uint32,
	pools []poolstypes.Pool,
	operators []operatorstypes.Operator,
	amtPerDeyDenoms []string,
) types.RewardsPlan

func RandomRewardsPlans

func RandomRewardsPlans(
	r *rand.Rand,
	pools []poolstypes.Pool,
	operators []operatorstypes.Operator,
	services []servicestypes.Service,
	allowedDenoms []string,
) []types.RewardsPlan

func RandomServicePools

func RandomServicePools(
	r *rand.Rand,
	servicesGenesis servicestypes.GenesisState,
	availableDenoms []string,
) types.ServicePools

func RandomUsersDistribution

func RandomUsersDistribution(r *rand.Rand) types.UsersDistribution

func RandomUsersDistributionType

func RandomUsersDistributionType(_ *rand.Rand) types.UsersDistributionType

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the operators module

func SimulateMsgUpdateParams

func SimulateMsgUpdateParams(bankKeeper bankkeeper.Keeper) func(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) sdk.Msg

SimulateMsgUpdateParams returns a random MsgUpdateParams

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL