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

Index

Constants

View Source
const (
	GroupInfo        = "group-info"
	GroupMembers     = "group-members"
	GroupAccountInfo = "group-accout-info"
	GroupProposals   = "group-proposals"
	GroupVote        = "group-vote"
)
View Source
const (
	OpMsgCreateGroup                      = "op_weight_msg_create_group"
	OpMsgUpdateGroupAdmin                 = "op_weight_msg_update_group_admin"
	OpMsgUpdateGroupMetadata              = "op_wieght_msg_update_group_metadata"
	OpMsgUpdateGroupMembers               = "op_weight_msg_update_group_members"
	OpMsgCreateGroupAccountRequest        = "op_weight_msg_create_group_account"
	OpMsgUpdateGroupAccountAdmin          = "op_weight_msg_update_group_account_admin"
	OpMsgUpdateGroupAccountDecisionPolicy = "op_weight_msg_update_group_account_decision_policy"
	OpMsgUpdateGroupAccountMetaData       = "op_weight_msg_update_group_account_metadata"
	OpMsgCreateProposal                   = "op_weight_msg_create_proposal"
	OpMsgVote                             = "op_weight_msg_vote"
	OpMsgExec                             = "ops_weight_msg_exec"
)

Simulation operation weights constants

View Source
const (
	WeightCreateGroup                      = 100
	WeightCreateGroupAccount               = 100
	WeightCreateProposal                   = 90
	WeightMsgVote                          = 90
	WeightMsgExec                          = 90
	WeightUpdateGroupMetadata              = 5
	WeightUpdateGroupAdmin                 = 5
	WeightUpdateGroupMembers               = 5
	WeightUpdateGroupAccountAdmin          = 5
	WeightUpdateGroupAccountDecisionPolicy = 5
	WeightUpdateGroupAccountMetadata       = 5
	GroupMemberWeight                      = 40
)

If update group or group account txn's executed, `SimulateMsgVote` & `SimulateMsgExec` txn's returns `noOp`. That's why we have less weight for update group & group-account txn's.

Variables

View Source
var (
	TypeMsgCreateGroup                      = sdk.MsgTypeURL(&group.MsgCreateGroup{})
	TypeMsgUpdateGroupMembers               = sdk.MsgTypeURL(&group.MsgUpdateGroupMembers{})
	TypeMsgUpdateGroupAdmin                 = sdk.MsgTypeURL(&group.MsgUpdateGroupAdmin{})
	TypeMsgUpdateGroupMetadata              = sdk.MsgTypeURL(&group.MsgUpdateGroupMetadata{})
	TypeMsgCreateGroupAccount               = sdk.MsgTypeURL(&group.MsgCreateGroupAccount{})
	TypeMsgUpdateGroupAccountAdmin          = sdk.MsgTypeURL(&group.MsgUpdateGroupAccountAdmin{})
	TypeMsgUpdateGroupAccountDecisionPolicy = sdk.MsgTypeURL(&group.MsgUpdateGroupAccountDecisionPolicy{})
	TypeMsgUpdateGroupAccountMetadata       = sdk.MsgTypeURL(&group.MsgUpdateGroupAccountMetadata{})
	TypeMsgCreateProposal                   = sdk.MsgTypeURL(&group.MsgCreateProposal{})
	TypeMsgVote                             = sdk.MsgTypeURL(&group.MsgVote{})
	TypeMsgExec                             = sdk.MsgTypeURL(&group.MsgExec{})
)

group message types

Functions

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the group module.

func SimulateMsgCreateGroup

func SimulateMsgCreateGroup(ak exported.AccountKeeper, bk exported.BankKeeper, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgCreateGroup generates a MsgCreateGroup with random values

func SimulateMsgCreateGroupAccount

func SimulateMsgCreateGroupAccount(ak exported.AccountKeeper, bk exported.BankKeeper, qryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgCreateGroupAccount generates a NewMsgCreateGroupAccount with random values

func SimulateMsgCreateProposal

func SimulateMsgCreateProposal(ak exported.AccountKeeper, bk exported.BankKeeper, queryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgCreateProposal generates a NewMsgCreateProposal with random values

func SimulateMsgExec

func SimulateMsgExec(ak exported.AccountKeeper,
	bk exported.BankKeeper, queryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgExec generates a MsgExec with random values

func SimulateMsgUpdateGroupAccountAdmin

func SimulateMsgUpdateGroupAccountAdmin(ak exported.AccountKeeper, bk exported.BankKeeper, queryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgUpdateGroupAccountAdmin generates a MsgUpdateGroupAccountAdmin with random values

func SimulateMsgUpdateGroupAccountDecisionPolicy

func SimulateMsgUpdateGroupAccountDecisionPolicy(ak exported.AccountKeeper,
	bk exported.BankKeeper, queryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgUpdateGroupAccountDecisionPolicy generates a NewMsgUpdateGroupAccountDecisionPolicyRequest with random values

func SimulateMsgUpdateGroupAccountMetadata

func SimulateMsgUpdateGroupAccountMetadata(ak exported.AccountKeeper,
	bk exported.BankKeeper, queryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgUpdateGroupAccountMetadata generates a MsgUpdateGroupAccountMetadata with random values

func SimulateMsgUpdateGroupAdmin

func SimulateMsgUpdateGroupAdmin(ak exported.AccountKeeper, bk exported.BankKeeper, queryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgUpdateGroupAdmin generates a MsgUpdateGroupAccountAdmin with random values

func SimulateMsgUpdateGroupMembers

func SimulateMsgUpdateGroupMembers(ak exported.AccountKeeper,
	bk exported.BankKeeper, queryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgUpdateGroupMembers generates a MsgUpdateGroupMembers with random values

func SimulateMsgUpdateGroupMetadata

func SimulateMsgUpdateGroupMetadata(ak exported.AccountKeeper, bk exported.BankKeeper, queryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgUpdateGroupMetadata generates a MsgUpdateGroupMetadata with random values

func SimulateMsgVote

func SimulateMsgVote(ak exported.AccountKeeper,
	bk exported.BankKeeper, queryClient group.QueryClient, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgVote generates a MsgVote with random values

func WeightedOperations

func WeightedOperations(
	appParams simtypes.AppParams, cdc codec.JSONCodec, ak exported.AccountKeeper,
	bk exported.BankKeeper, qryClient group.QueryClient, protoCdc *codec.ProtoCodec) 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