utils

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []string, e string) bool

func GenAndDeliverTx

GenAndDeliverTx generates a transactions and delivers it.

func GenAndDeliverTxWithRandFees

func GenAndDeliverTxWithRandFees(r *rand.Rand, txCtx simulation.OperationInput) (simtypes.OperationMsg, []simtypes.FutureOperation, error)

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

func GetAccountAndSpendableCoins

func GetAccountAndSpendableCoins(ctx sdk.Context, bk ecocredit.BankKeeper,
	accs []simtypes.Account, addr, msgType string) (sdk.Coins, *simtypes.Account, simtypes.OperationMsg, error)

func GetClasses

func GetClasses(sdkCtx sdk.Context, _ *rand.Rand, qryClient basetypes.QueryServer, msgType string) ([]*basetypes.ClassInfo, simtypes.OperationMsg, error)

func GetRandomClass

func GetRandomClass(sdkCtx sdk.Context, r *rand.Rand, qryClient basetypes.QueryServer, msgType string) (*basetypes.ClassInfo, simtypes.OperationMsg, error)

func RandomDeposit

func RandomDeposit(r *rand.Rand, ctx sdk.Context,
	ak ecocredit.AccountKeeper, bk ecocredit.BankKeeper, depositParams govtypes.DepositParams, addr sdk.AccAddress,
) (deposit sdk.Coins, skip bool, err error)

RandomDeposit returns minimum deposit if account have enough balance else returns deposit amount between (1, balance)

func RandomExponent

func RandomExponent(r *rand.Rand, precision uint32) uint32

func RandomFee

func RandomFee(r *rand.Rand) sdk.Coin

RandomFee generate random credit class/basket creation fee

Types

This section is empty.

Jump to

Keyboard shortcuts

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