simulation

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Overview

DONTCOVER

Index

Constants

View Source
const (
	OpWeightMsgCreateClass         = "op_weight_msg_create_class"
	OpWeightMsgCreateBatch         = "op_weight_msg_create_batch"
	OpWeightMsgSend                = "op_weight_msg_send"
	OpWeightMsgRetire              = "op_weight_msg_retire"
	OpWeightMsgCancel              = "op_weight_msg_cancel"
	OpWeightMsgUpdateClassAdmin    = "op_weight_msg_update_class_admin"
	OpWeightMsgUpdateClassMetadata = "op_weight_msg_update_class_metadata"
	OpWeightMsgUpdateClassIssuers  = "op_weight_msg_update_class_issuers"
)

Simulation operation weights constants

View Source
const (
	WeightCreateClass = 10
	WeightCreateBatch = 50
	WeightSend        = 100
	WeightRetire      = 80
	WeightCancel      = 30
	WeightUpdateClass = 30
)

ecocredit operations weights

Variables

View Source
var (
	TypeMsgCreateClass         = sdk.MsgTypeURL(&ecocredit.MsgCreateClass{})
	TypeMsgCreateBatch         = sdk.MsgTypeURL(&ecocredit.MsgCreateBatch{})
	TypeMsgSend                = sdk.MsgTypeURL(&ecocredit.MsgSend{})
	TypeMsgRetire              = sdk.MsgTypeURL(&ecocredit.MsgRetire{})
	TypeMsgCancel              = sdk.MsgTypeURL(&ecocredit.MsgCancel{})
	TypeMsgUpdateClassAdmin    = sdk.MsgTypeURL(&ecocredit.MsgUpdateClassAdmin{})
	TypeMsgUpdateClassIssuers  = sdk.MsgTypeURL(&ecocredit.MsgUpdateClassIssuers{})
	TypeMsgUpdateClassMetadata = sdk.MsgTypeURL(&ecocredit.MsgUpdateClassMetadata{})
)

ecocredit message types

Functions

func GenAndDeliverTx

GenAndDeliverTx generates a transactions and delivers it.

func GenAndDeliverTxWithRandFees

func GenAndDeliverTxWithRandFees(txCtx simulation.OperationInput) (simtypes.OperationMsg, []simtypes.FutureOperation, error)

GenAndDeliverTxWithRandFees generates a transaction with a random fee and delivers it.

func ParamChanges

func ParamChanges(r *rand.Rand) []simtypes.ParamChange

ParamChanges defines the parameters that can be modified by param change proposals on the simulation

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the ecocredit module.

func SimulateMsgCancel

SimulateMsgCancel generates a MsgCancel with random values.

func SimulateMsgCreateBatch

func SimulateMsgCreateBatch(ak ecocredit.AccountKeeper, bk ecocredit.BankKeeper,
	qryClient ecocredit.QueryClient) simtypes.Operation

SimulateMsgCreateBatch generates a MsgCreateBatch with random values.

func SimulateMsgCreateClass

func SimulateMsgCreateClass(ak ecocredit.AccountKeeper, bk ecocredit.BankKeeper,
	qryClient ecocredit.QueryClient) simtypes.Operation

SimulateMsgCreateClass generates a MsgCreateClass with random values.

func SimulateMsgRetire

SimulateMsgRetire generates a MsgRetire with random values.

func SimulateMsgSend

SimulateMsgSend generates a MsgSend with random values.

func SimulateMsgUpdateClassAdmin

func SimulateMsgUpdateClassAdmin(ak ecocredit.AccountKeeper, bk ecocredit.BankKeeper,
	qryClient ecocredit.QueryClient) simtypes.Operation

SimulateMsgUpdateClassAdmin generates a MsgUpdateClassAdmin with random values

func SimulateMsgUpdateClassIssuers

func SimulateMsgUpdateClassIssuers(ak ecocredit.AccountKeeper, bk ecocredit.BankKeeper,
	qryClient ecocredit.QueryClient) simtypes.Operation

SimulateMsgUpdateClassIssuers generates a MsgUpdateClassMetaData with random values

func SimulateMsgUpdateClassMetadata

func SimulateMsgUpdateClassMetadata(ak ecocredit.AccountKeeper, bk ecocredit.BankKeeper,
	qryClient ecocredit.QueryClient) simtypes.Operation

SimulateMsgUpdateClassMetadata generates a MsgUpdateClassMetadata with random metadata

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