simulation

package
v8.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: LGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgSwapOrder       = "op_weight_msg_swap_order"
	OpWeightMsgAddLiquidity    = "op_weight_msg_add_liquidity"
	OpWeightMsgRemoveLiquidity = "op_weight_msg_remove_liquidity"
)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgUpdateParams int = 100

	OpWeightMsgUpdateParams = "op_weight_msg_update_params"
)

Simulation operation weights constants

Variables

View Source
var (
	TypeMsgSwapOrder       = sdk.MsgTypeURL(&types.MsgSwapOrder{})
	TypeMsgAddLiquidity    = sdk.MsgTypeURL(&types.MsgAddLiquidity{})
	TypeMsgRemoveLiquidity = sdk.MsgTypeURL(&types.MsgRemoveLiquidity{})
)

Functions

func FundAccount

func FundAccount(r *rand.Rand, ctx sdk.Context, k keeper.Keeper, bk types.BankKeeper, account sdk.AccAddress) error

func NewDecodeStore

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

NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding farming type.

func ProposalMsgs

func ProposalMsgs() []simtypes.WeightedProposalMsg

ProposalMsgs defines the module weighted proposals' contents

func RandomSpendableToken

func RandomSpendableToken(r *rand.Rand, spendableCoin sdk.Coins) sdk.Coin

func RandomTotalToken

func RandomTotalToken(r *rand.Rand, coins sdk.Coins) sdk.Coin

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for coinswap

func SimulateMsgAddLiquidity

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

SimulateMsgAddLiquidity simulates the addition of liquidity

func SimulateMsgRemoveLiquidity

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

SimulateMsgRemoveLiquidity simulates the removal of liquidity

func SimulateMsgSwapOrder

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

SimulateMsgSwapOrder simulates the swap of order

func SimulateMsgUpdateParams

func SimulateMsgUpdateParams(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) sdk.Msg

SimulateMsgUpdateParams returns a random MsgUpdateParams

Types

This section is empty.

Jump to

Keyboard shortcuts

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