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: 10 Imported by: ? modules, 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

View Source
var ShareDenoms = []string{"s/foo", "s/bar", "s/toto"}

ShareDenoms are the denom used for the shares in the simulation

Functions

func GetAccountWithShares

func GetAccountWithShares(
	r *rand.Rand,
	ctx sdk.Context,
	k keeper.Keeper,
	accs []simtypes.Account,
	requireNoMainnetLaunchTriggered bool,
) (uint64, simtypes.Account, types.Shares, bool)

GetAccountWithShares returns an account that contains allocated shares with its associated project

func GetAccountWithVouchers

func GetAccountWithVouchers(
	r *rand.Rand,
	ctx sdk.Context,
	bk types.BankKeeper,
	k keeper.Keeper,
	accs []simtypes.Account,
	requireNoMainnetLaunchTriggered bool,
) (prjtID uint64, account simtypes.Account, coins sdk.Coins, found bool)

GetAccountWithVouchers returns an account that has vouchers for a project

func GetCoordSimAccount

func GetCoordSimAccount(
	r *rand.Rand,
	ctx sdk.Context,
	pk types.ProfileKeeper,
	accs []simtypes.Account,
) (simtypes.Account, uint64, bool)

GetCoordSimAccount finds an account associated with a coordinator profile from simulation accounts

func GetCoordSimAccountWithProjectID

func GetCoordSimAccountWithProjectID(
	r *rand.Rand,
	ctx sdk.Context,
	pk types.ProfileKeeper,
	k keeper.Keeper,
	accs []simtypes.Account,
	requireNoMainnetInitialized bool,
	requireNoMainnetLaunchTriggered bool,
) (simtypes.Account, uint64, bool)

GetCoordSimAccountWithProjectID finds an account associated with a coordinator profile from simulation accounts and a project created by this coordinator. The boolean flag `requireNoMainnetLaunchTriggered` is ignored if the flag `requireNoMainnetInitialized` is set to `true`

func GetSharesFromProject

func GetSharesFromProject(r *rand.Rand, ctx sdk.Context, k keeper.Keeper, prjtID uint64) (types.Shares, bool)

GetSharesFromProject returns a small portion of shares that can be minted as vouchers or added to an account

func SimulateMsgBurnVouchers

func SimulateMsgBurnVouchers(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
	txGen client.TxConfig,
) simtypes.Operation

func SimulateMsgCreateProject

func SimulateMsgCreateProject(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	pk types.ProfileKeeper,
	k keeper.Keeper,
	txGen client.TxConfig,
) simtypes.Operation

SimulateMsgCreateProject simulates a MsgCreateProject message

func SimulateMsgRedeemVouchers

func SimulateMsgRedeemVouchers(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
	txGen client.TxConfig,
) simtypes.Operation

func SimulateMsgUnredeemVouchers

func SimulateMsgUnredeemVouchers(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
	txGen client.TxConfig,
) simtypes.Operation

Types

type TypedMsg

type TypedMsg interface {
	sdk.Msg
	Type() string
}

TypedMsg extends sdk.Msg with Type method

Jump to

Keyboard shortcuts

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