simulation

package
v21.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgCreateDenom      = "op_weight_msg_create_denom"
	OpWeightMsgMint             = "op_weight_msg_mint"
	OpWeightMsgBurn             = "op_weight_msg_burn"
	OpWeightMsgChangeAdmin      = "op_weight_msg_change_admin"
	OpWeightMsgSetDenomMetadata = "op_weight_msg_set_denom_metadata"
	OpWeightMsgForceTransfer    = "op_weight_msg_force_transfer"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func BuildOperationInput

func BuildOperationInput(
	r *rand.Rand,
	app *baseapp.BaseApp,
	ctx sdk.Context,
	msg interface {
		sdk.Msg
		Type() string
	},
	simAccount simtypes.Account,
	ak types.AccountKeeper,
	bk BankKeeper,
	deposit sdk.Coins,
) simulation.OperationInput

BuildOperationInput helper to build object

func DefaultSimulationDenomSelector

func DefaultSimulationDenomSelector(r *rand.Rand, ctx sdk.Context, tfKeeper TokenfactoryKeeper, creator string) (string, bool)

func RandDenomCreationFeeParam

func RandDenomCreationFeeParam(r *rand.Rand) sdk.Coins

func RandomizedGenState

func RandomizedGenState(simstate *module.SimulationState)

func SimulateMsgBurn

func SimulateMsgBurn(
	tfKeeper TokenfactoryKeeper,
	ak types.AccountKeeper,
	bk BankKeeper,
	denomSelector DenomSelector,
) simtypes.Operation

func SimulateMsgChangeAdmin

func SimulateMsgChangeAdmin(
	tfKeeper TokenfactoryKeeper,
	ak types.AccountKeeper,
	bk BankKeeper,
	denomSelector DenomSelector,
) simtypes.Operation

func SimulateMsgCreateDenom

func SimulateMsgCreateDenom(tfKeeper TokenfactoryKeeper, ak types.AccountKeeper, bk BankKeeper) simtypes.Operation

Simulate msg create denom

func SimulateMsgMint

func SimulateMsgMint(
	tfKeeper TokenfactoryKeeper,
	ak types.AccountKeeper,
	bk BankKeeper,
	denomSelector DenomSelector,
) simtypes.Operation

Simulate msg mint denom

func SimulateMsgSetDenomMetadata

func SimulateMsgSetDenomMetadata(
	tfKeeper TokenfactoryKeeper,
	ak types.AccountKeeper,
	bk BankKeeper,
	denomSelector DenomSelector,
) simtypes.Operation

Types

type BankKeeper

type BankKeeper interface {
	simulation.BankKeeper
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
}

type DenomSelector

type DenomSelector = func(*rand.Rand, sdk.Context, TokenfactoryKeeper, string) (string, bool)

type TokenfactoryKeeper

type TokenfactoryKeeper interface {
	GetParams(ctx sdk.Context) (params types.Params)
	GetAuthorityMetadata(ctx sdk.Context, denom string) (types.DenomAuthorityMetadata, error)
	GetAllDenomsIterator(ctx sdk.Context) sdk.Iterator
	GetDenomsFromCreator(ctx sdk.Context, creator string) []string
}

Jump to

Keyboard shortcuts

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