simulation

package
v6.2.0-bdjuno Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OpWeightMsgCreatePool              = "op_weight_create_pool"
	OpWeightMsgSwapExactAmountIn       = "op_weight_swap_exact_amount_in"
	OpWeightMsgSwapExactAmountOut      = "op_weight_swap_exact_amount_out"
	OpWeightMsgJoinPool                = "op_weight_join_pool"
	OpWeightMsgExitPool                = "op_weight_exit_pool"
	OpWeightMsgJoinSwapExternAmountIn  = "op_weight_join_swap_extern_amount_in"
	OpWeightMsgJoinSwapShareAmountOut  = "op_weight_join_swap_share_amount_out"
	OpWeightMsgExitSwapExternAmountOut = "op_weight_exit_swap_extern_amount_out"
	OpWeightMsgExitSwapShareAmountIn   = "op_weight_exit_swap_share_amount_in"

	DefaultWeightMsgCreatePool              int = 10
	DefaultWeightMsgSwapExactAmountIn       int = 25
	DefaultWeightMsgSwapExactAmountOut      int = 10
	DefaultWeightMsgJoinPool                int = 10
	DefaultWeightMsgExitPool                int = 10
	DefaultWeightMsgJoinSwapExternAmountIn  int = 10
	DefaultWeightMsgJoinSwapShareAmountOut  int = 10
	DefaultWeightMsgExitSwapExternAmountOut int = 10
	DefaultWeightMsgExitSwapShareAmountIn   int = 10
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func Max

func Max(x, y int) int

func Min

func Min(x, y int) int

func RandomExactAmountInRoute

func RandomExactAmountInRoute(ctx sdk.Context, r *rand.Rand, k keeper.Keeper, tokenIn sdk.Coin) (res []types.SwapAmountInRoute, tokenOut sdk.Coin)

func SimulateMsgCreatePool

SimulateMsgCreatePool generates a MsgCreatePool with random values

func SimulateMsgSwapExactAmountIn

func SimulateMsgSwapExactAmountIn(ak stakingTypes.AccountKeeper, bk stakingTypes.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgSwapExactAmountIn generates a MsgSwapExactAmountIn with random values TODO: Change to use expected keepers

func WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Types

This section is empty.

Jump to

Keyboard shortcuts

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