simulation

package
v5.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Fees               = "fees"
	MaxOrderPriceRatio = "max_order_price_ratio"
)

Simulation parameter constants

View Source
const (
	OpWeightMsgCreateMarket      = "op_weight_msg_create_market"
	OpWeightMsgPlaceLimitOrder   = "op_weight_msg_place_limit_order"
	OpWeightMsgPlaceMMLimitOrder = "op_weight_msg_place_mm_limit_order"
	OpWeightMsgPlaceMarketOrder  = "op_weight_msg_place_market_order"
	OpWeightMsgCancelOrder       = "op_weight_msg_cancel_order"
	OpWeightMsgCancelAllOrders   = "op_weight_msg_cancel_all_orders"
	OpWeightMsgSwapExactAmountIn = "op_weight_msg_swap_exact_amount_in"

	DefaultWeightMsgCreateMarket      = 10
	DefaultWeightMsgPlaceLimitOrder   = 90
	DefaultWeightMsgPlaceMMLimitOrder = 50
	DefaultWeightMsgPlaceMarketOrder  = 90
	DefaultWeightMsgCancelOrder       = 20
	DefaultWeightMsgCancelAllOrders   = 10
	DefaultWeightMsgSwapExactAmountIn = 80
)

Simulation operation weights constants.

View Source
const (
	OpWeightSubmitMarketParameterChangeProposal = "op_weight_submit_market_parameter_change_proposal"

	DefaultWeightMarketParameterChangeProposal = 5
)

Variables

This section is empty.

Functions

func GenFees

func GenFees(r *rand.Rand) types.Fees

func GenMaxOrderPriceRatio

func GenMaxOrderPriceRatio(r *rand.Rand) sdk.Dec

func NewDecodeStore

func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string

func ParamChanges

func ParamChanges(_ *rand.Rand) []simtypes.ParamChange

ParamChanges defines the parameters that can be modified by param change proposals on the simulation.

func ProposalContents

func ProposalContents(k keeper.Keeper) []simtypes.WeightedProposalContent

ProposalContents defines the module weighted proposals' contents

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the module.

func SimulateMarketParameterChangeProposal

func SimulateMarketParameterChangeProposal(k keeper.Keeper) simtypes.ContentSimulatorFn

func SimulateMsgCancelAllOrders

func SimulateMsgCancelAllOrders(
	ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper,
) simtypes.Operation

func SimulateMsgCancelOrder

func SimulateMsgCancelOrder(
	ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper,
) simtypes.Operation

func SimulateMsgCreateMarket

func SimulateMsgCreateMarket(
	ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper,
) simtypes.Operation

func SimulateMsgPlaceLimitOrder

func SimulateMsgPlaceLimitOrder(
	ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper,
) simtypes.Operation

func SimulateMsgPlaceMMLimitOrder

func SimulateMsgPlaceMMLimitOrder(
	ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper,
) simtypes.Operation

func SimulateMsgPlaceMarketOrder

func SimulateMsgPlaceMarketOrder(
	ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper,
) simtypes.Operation

func SimulateMsgSwapExactAmountIn

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

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