simulation

package
v0.43.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0 Imports: 20 Imported by: 10

Documentation

Index

Constants

View Source
const (
	TypeMsgGrantAuthorization  = "/cosmos.authz.v1beta1.Msg/GrantAuthorization"
	TypeMsgRevokeAuthorization = "/cosmos.authz.v1beta1.Msg/RevokeAuthorization"
	TypeMsgExecDelegated       = "/cosmos.authz.v1beta1.Msg/ExecAuthorized"
)

authz message types

View Source
const (
	OpWeightMsgGrantAuthorization = "op_weight_msg_grant_authorization"
	OpWeightRevokeAuthorization   = "op_weight_msg_revoke_authorization"
	OpWeightExecAuthorized        = "op_weight_msg_execute_authorized"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func GenAuthorizationGrant

func GenAuthorizationGrant(_ *rand.Rand, _ []simtypes.Account) []types.GrantAuthorization

GenAuthorizationGrant returns an empty slice of authorization grants.

func NewDecodeStore

func NewDecodeStore(cdc codec.Marshaler) 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 SimulateMsgExecuteAuthorized

func SimulateMsgExecuteAuthorized(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, cdc cdctypes.AnyUnpacker, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgExecuteAuthorized generates a MsgExecuteAuthorized with random values. nolint: funlen

func SimulateMsgGrantAuthorization

func SimulateMsgGrantAuthorization(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper,
	protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgGrantAuthorization generates a MsgGrantAuthorization with random values. nolint: funlen

func SimulateMsgRevokeAuthorization

func SimulateMsgRevokeAuthorization(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, protoCdc *codec.ProtoCodec) simtypes.Operation

SimulateMsgRevokeAuthorization generates a MsgRevokeAuthorization with random values. nolint: funlen

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