Documentation ¶
Index ¶
- Constants
- func GenInitPoolCoinMintAmount(r *rand.Rand) sdk.Int
- func GenLiquidityPoolTypes(r *rand.Rand) (liquidityPoolTypes []types.PoolType)
- func GenMaxOrderAmountRatio(r *rand.Rand) sdk.Dec
- func GenMaxReserveCoinAmount(r *rand.Rand) sdk.Int
- func GenMinInitDepositAmount(r *rand.Rand) sdk.Int
- func GenPoolCreationFee(r *rand.Rand) sdk.Coins
- func GenSwapFeeRate(r *rand.Rand) sdk.Dec
- func GenUnitBatchHeight(r *rand.Rand) uint32
- func GenWithdrawFeeRate(r *rand.Rand) sdk.Dec
- func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string
- func ParamChanges(r *rand.Rand) []simtypes.ParamChange
- func RandomizedGenState(simState *module.SimulationState)
- func SimulateMsgCreatePool(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation
- func SimulateMsgDepositWithinBatch(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation
- func SimulateMsgSwapWithinBatch(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation
- func SimulateMsgWithdrawWithinBatch(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation
- func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, ...) simulation.WeightedOperations
Constants ¶
const ( LiquidityPoolTypes = "liquidity_pool_types" MinInitDepositAmount = "min_init_deposit_amount" InitPoolCoinMintAmount = "init_pool_coin_mint_amount" MaxReserveCoinAmount = "max_reserve_coin_amount" PoolCreationFee = "pool_creation_fee" SwapFeeRate = "swap_fee_rate" WithdrawFeeRate = "withdraw_fee_rate" MaxOrderAmountRatio = "max_order_amount_ratio" UnitBatchHeight = "unit_batch_height" )
Simulation parameter constants
const ( OpWeightMsgCreatePool = "op_weight_msg_create_pool" OpWeightMsgDepositWithinBatch = "op_weight_msg_deposit_to_pool" OpWeightMsgWithdrawWithinBatch = "op_weight_msg_withdraw_from_pool" OpWeightMsgSwapWithinBatch = "op_weight_msg_swap" )
Simulation operation weights constants.
Variables ¶
This section is empty.
Functions ¶
func GenInitPoolCoinMintAmount ¶
GenInitPoolCoinMintAmount randomized InitPoolCoinMintAmount
func GenLiquidityPoolTypes ¶
GenLiquidityPoolTypes return default PoolType temporarily, It will be randomized in the liquidity v2
func GenMaxOrderAmountRatio ¶
GenMaxOrderAmountRatio randomized MaxOrderAmountRatio ranging from 0.00001 to 1
func GenMaxReserveCoinAmount ¶
GenMaxReserveCoinAmount randomized MaxReserveCoinAmount
func GenMinInitDepositAmount ¶
GenMinInitDepositAmount randomized MinInitDepositAmount
func GenPoolCreationFee ¶
GenPoolCreationFee randomized PoolCreationFee list of 1 to 4 coins with an amount greater than 1
func GenSwapFeeRate ¶
GenSwapFeeRate randomized SwapFeeRate ranging from 0.00001 to 1
func GenUnitBatchHeight ¶
GenUnitBatchHeight randomized UnitBatchHeight ranging from 1 to 20
func GenWithdrawFeeRate ¶
GenWithdrawFeeRate randomized WithdrawFeeRate ranging from 0.00001 to 1
func NewDecodeStore ¶
NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding liquidity type.
func ParamChanges ¶
func ParamChanges(r *rand.Rand) []simtypes.ParamChange
ParamChanges defines the parameters that can be modified by param change proposals on the simulation
func RandomizedGenState ¶
func RandomizedGenState(simState *module.SimulationState)
RandomizedGenState generates a random GenesisState for liquidity
func SimulateMsgCreatePool ¶
func SimulateMsgCreatePool(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation
SimulateMsgCreatePool generates a MsgCreatePool with random values
func SimulateMsgDepositWithinBatch ¶
func SimulateMsgDepositWithinBatch(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation
SimulateMsgDepositWithinBatch generates a MsgDepositWithinBatch with random values
func SimulateMsgSwapWithinBatch ¶
func SimulateMsgSwapWithinBatch(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation
SimulateMsgSwapWithinBatch generates a MsgSwapWithinBatch with random values
func SimulateMsgWithdrawWithinBatch ¶
func SimulateMsgWithdrawWithinBatch(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation
SimulateMsgWithdrawWithinBatch generates a MsgWithdrawWithinBatch with random values.
func WeightedOperations ¶
func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, ) simulation.WeightedOperations
WeightedOperations returns all the operations from the module with their respective weights.
Types ¶
This section is empty.