simulation

package
v0.0.0-...-a6871c7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OpWeightMsgSend           = "op_weight_msg_send"
	OpWeightMsgMultiSend      = "op_weight_msg_multisend"
	DefaultWeightMsgSend      = 100 // from simappparams.DefaultWeightMsgSend
	DefaultWeightMsgMultiSend = 10  // from simappparams.DefaultWeightMsgMultiSend

)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgUpdateParams int = 100

	OpWeightMsgUpdateParams = "op_weight_msg_update_params"
)

Simulation operation weights constants

Variables

View Source
var KeyDefaultSendEnabled = []byte("DefaultSendEnabled")

KeyDefaultSendEnabled is store's key for the DefaultSendEnabled option

Functions

func ProposalMsgs

func ProposalMsgs() []simtypes.WeightedProposalMsg

ProposalMsgs defines the module weighted proposals' contents

func RandomGenesisBalances

func RandomGenesisBalances(simState *module.SimulationState) ([]types.Balance, error)

RandomGenesisBalances returns a slice of account balances. Each account has a balance of simState.InitialStake for simState.BondDenom.

func RandomGenesisDefaultSendEnabledParam

func RandomGenesisDefaultSendEnabledParam(r *rand.Rand) bool

RandomGenesisDefaultSendEnabledParam computes randomized allow all send transfers param for the bank module

func RandomGenesisSendEnabled

func RandomGenesisSendEnabled(r *rand.Rand, bondDenom string) []types.SendEnabled

RandomGenesisSendEnabled creates randomized values for the SendEnabled slice.

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for bank

func SimulateMsgMultiSend

func SimulateMsgMultiSend(txGen client.TxConfig, ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operation

SimulateMsgMultiSend tests and runs a single msg multisend, with randomized, capped number of inputs/outputs. all accounts in msg fields exist in state

func SimulateMsgMultiSendToModuleAccount

func SimulateMsgMultiSendToModuleAccount(
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk keeper.Keeper,
	moduleAccount int,
) simtypes.Operation

SimulateMsgMultiSendToModuleAccount sends coins to Module Accounts

func SimulateMsgSend

func SimulateMsgSend(
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk keeper.Keeper,
) simtypes.Operation

SimulateMsgSend tests and runs a single msg send where both accounts already exist.

func SimulateMsgSendToModuleAccount

func SimulateMsgSendToModuleAccount(
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk keeper.Keeper,
	moduleAccount int,
) simtypes.Operation

SimulateMsgSendToModuleAccount tests and runs a single msg send where both accounts already exist.

func SimulateMsgUpdateParams

func SimulateMsgUpdateParams(r *rand.Rand, _ []simtypes.Account, ac coreaddress.Codec) (sdk.Msg, error)

SimulateMsgUpdateParams returns a random MsgUpdateParams

func WeightedOperations

func WeightedOperations(
	appParams simtypes.AppParams,
	cdc codec.JSONCodec,
	txGen client.TxConfig,
	ak types.AccountKeeper,
	bk keeper.Keeper,
) simulation.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