simulation

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindLargestMaxBid

func FindLargestMaxBid(tierList []types.Tier) (types.Tier, bool)

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 uint64,
	auctionID uint64,
) (simtypes.Account, uint64, bool)

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

func RandomAccWithBalance

func RandomAccWithBalance(ctx sdk.Context, r *rand.Rand,
	bk bankkeeper.Keeper,
	accs []simtypes.Account,
	desired sdk.Coins,
) (simtypes.Account, sdk.Coins, bool)

RandomAccWithBalance returns random account with the desired available balance

func RandomAuction

func RandomAuction(ctx sdk.Context, r *rand.Rand, fk fundraisingkeeper.Keeper) (auction fundraisingtypes.AuctionI, found bool)

RandomAuction returns random auction that is not started nor cancelled

func RandomAuctionWithdrawEnabled

func RandomAuctionWithdrawEnabled(
	ctx sdk.Context,
	r *rand.Rand,
	fk fundraisingkeeper.Keeper,
	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