simulation

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomAccWithAuctionUsedAllocationsNotWithdrawn

func RandomAccWithAuctionUsedAllocationsNotWithdrawn(
	ctx sdk.Context,
	r *rand.Rand,
	k keeper.Keeper,
	accs []simtypes.Account,
	auctionID uint64,
) (simtypes.Account, bool)

RandomAccWithAuctionUsedAllocationsNotWithdrawn returns random account that has used allocations for the given auction that have not yet been withdrawn

func RandomAccWithAvailableAllocations

func RandomAccWithAvailableAllocations(ctx sdk.Context, r *rand.Rand,
	k keeper.Keeper,
	accs []simtypes.Account,
	desired sdkmath.Int,
	auctionID uint64,
) (simtypes.Account, sdkmath.Int, bool)

RandomAccWithAvailableAllocations returns random account that has at least the desired amount of available allocations and can still participate in the specified auction

func RandomAuctionParticipationEnabled

func RandomAuctionParticipationEnabled(
	ctx sdk.Context,
	r *rand.Rand,
	fk types.FundraisingKeeper,
	k keeper.Keeper,
) (auction fundraisingtypes.AuctionI, found bool)

RandomAuctionParticipationEnabled returns random auction where participation is enabled

func RandomAuctionWithdrawEnabled

func RandomAuctionWithdrawEnabled(
	ctx sdk.Context,
	r *rand.Rand,
	fk types.FundraisingKeeper,
	k keeper.Keeper,
) (auction fundraisingtypes.AuctionI, found bool)

RandomAuctionWithdrawEnabled returns random auction where used allocations can be withdrawn at blockTime

func RandomTierFromList

func RandomTierFromList(r *rand.Rand, tierList []types.Tier) (types.Tier, bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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