simulation

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 22 Imported by: 13

Documentation

Index

Constants

View Source
const (
	OpWeightMsgGrant = "op_weight_msg_grant"
	OpWeightRevoke   = "op_weight_msg_revoke"
	OpWeightExec     = "op_weight_msg_execute"
)

Simulation operation weights constants will be removed in the future

View Source
const (
	WeightGrant  = 100
	WeightRevoke = 90
	WeightExec   = 90
)

authz operations weights will be removed in the future

Variables

View Source
var (
	TypeMsgGrant  = sdk.MsgTypeURL(&authz.MsgGrant{})
	TypeMsgRevoke = sdk.MsgTypeURL(&authz.MsgRevoke{})
	TypeMsgExec   = sdk.MsgTypeURL(&authz.MsgExec{})
)

authz message types will be removed in the future

Functions

func MsgExecFactory added in v0.53.0

func MsgExecFactory(k keeper.Keeper) simsx.SimMsgFactoryFn[*authz.MsgExec]

func MsgGrantFactory added in v0.53.0

func MsgGrantFactory() simsx.SimMsgFactoryFn[*authz.MsgGrant]

func MsgRevokeFactory added in v0.53.0

func MsgRevokeFactory(k keeper.Keeper) simsx.SimMsgFactoryFn[*authz.MsgRevoke]

func NewDecodeStore

func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string

NewDecodeStore returns a decoder function closure that umarshals the KVPair's Value to the corresponding authz type.

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for authz.

func SimulateMsgExec

SimulateMsgExec generates a MsgExec with random values. will be removed in the future in favor of msg factory

func SimulateMsgGrant

func SimulateMsgGrant(
	cdc *codec.ProtoCodec,
	txCfg client.TxConfig,
	ak authz.AccountKeeper,
	bk authz.BankKeeper,
	_ keeper.Keeper,
) simtypes.Operation

SimulateMsgGrant generates a MsgGrant with random values. will be removed in the future in favor of msg factory

func SimulateMsgRevoke

func SimulateMsgRevoke(
	cdc *codec.ProtoCodec,
	txCfg client.TxConfig,
	ak authz.AccountKeeper,
	bk authz.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgRevoke generates a MsgRevoke with random values. will be removed in the future in favor of msg factory

func WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights will be removed in the future in favor of msg factory

Types

This section is empty.

Jump to

Keyboard shortcuts

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