simulation

package
v0.0.0-...-7205676 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgCreateValidator = "op_weight_msg_create_validator"
	OpWeightMsgUpdateValidator = "op_weight_msg_update_validator"
	OpWeightMsgDelegate        = "op_weight_msg_delegate"
	OpWeightMsgUndelegate      = "op_weight_msg_undelegate"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func BuildOperationInput

func BuildOperationInput(
	r *rand.Rand,
	app *baseapp.BaseApp,
	ctx sdk.Context,
	msg interface {
		sdk.Msg
		Type() string
	},
	simAccount simtypes.Account,
	ak types.AccountKeeper,
	bk BankKeeper,
	deposit sdk.Coins,
) simulation.OperationInput

BuildOperationInput helper to build object

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState

func SimulateMsgCreateValidator

func SimulateMsgCreateValidator(bk BankKeeper, ak types.AccountKeeper, k poeKeeper) simtypes.Operation

SimulateMsgCreateValidator generates a MsgCreateValidator with random values

func SimulateMsgDelegate

func SimulateMsgDelegate(bk BankKeeper, ak types.AccountKeeper, k poeKeeper) simtypes.Operation

SimulateMsgDelegate generates a MsgDelegate with random values

func SimulateMsgUndelegate

func SimulateMsgUndelegate(bk BankKeeper, ak types.AccountKeeper, k poeKeeper) simtypes.Operation

SimulateMsgUndelegate generates a MsgUndelegate with random values

func SimulateMsgUpdateValidator

func SimulateMsgUpdateValidator(bk BankKeeper, ak types.AccountKeeper, k poeKeeper) simtypes.Operation

SimulateMsgUpdateValidator generates a MsgUpdateValidator with random values

func WeightedOperations

func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, bk BankKeeper, ak types.AccountKeeper, k poeKeeper) simulation.WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Types

type BankKeeper

type BankKeeper interface {
	types.BankKeeper
	simulation.BankKeeper
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
}

BankKeeper extended bank keeper used by simulations

Jump to

Keyboard shortcuts

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