simulation

package
v2.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// C's operations
	OpWeightMsgCreatePool = "op_weight_msg_create_pool"
	OpWeightMsgUpdatePool = "op_weight_msg_update_pool"

	// B and C's operations
	OpWeightMsgDepositCollateral  = "op_weight_msg_deposit_collateral"
	OpWeightMsgWithdrawCollateral = "op_weight_msg_withdraw_collateral"
	OpWeightMsgWithdrawRewards    = "op_weight_msg_withdraw_rewards"

	// P's operations
	OpWeightMsgPurchaseShield     = "op_weight_msg_purchase_shield"
	OpWeightShieldClaimProposal   = "op_weight_msg_submit_claim_proposal"
	OpWeightStakeForShield        = "op_weight_msg_stake_for_shield"
	OpWeightUnstakeFromShield     = "op_weight_msg_unstake_from_shield"
	OpWeightWithdrawReimbursement = "op_weight_msg_withdraw_reimbursement"
)

Variables

View Source
var (
	DefaultWeightMsgCreatePool            = 10
	DefaultWeightMsgUpdatePool            = 20
	DefaultWeightMsgDepositCollateral     = 20
	DefaultWeightMsgWithdrawCollateral    = 20
	DefaultWeightMsgWithdrawRewards       = 10
	DefaultWeightMsgPurchaseShield        = 20
	DefaultWeightMsgStakeForShield        = 20
	DefaultWeightMsgUnstakeFromShield     = 15
	DefaultWeightShieldClaimProposal      = 5
	DefaultWeightMsgWithdrawReimbursement = 5

	DefaultIntMax = 10000000000
)

Functions

func GenClaimProposalParams

func GenClaimProposalParams(r *rand.Rand) types.ClaimProposalParams

GenClaimProposalParams returns a randomized ClaimProposalParams object.

func GenPoolParams

func GenPoolParams(r *rand.Rand) types.PoolParams

GenPoolParams returns a randomized PoolParams object.

func GenShieldStakingRateParam

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

GenShieldStakingRateParam returns a randomized staking-shield rate.

func GetRandDenom

func GetRandDenom(r *rand.Rand) string

GetRandDenom generates a random coin denom.

func NewDecodeStore

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

NewDecodeStore unmarshals the KVPair's Value to the corresponding type of shield module.

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

ProposalContents defines the module weighted proposals' contents

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState creates a random genesis state for module simulation.

func SimulateMsgCreatePool

SimulateMsgCreatePool generates a MsgCreatePool object with all of its fields randomized.

func SimulateMsgDepositCollateral

func SimulateMsgDepositCollateral(k keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper) simtypes.Operation

SimulateMsgDepositCollateral generates a MsgDepositCollateral object with all of its fields randomized.

func SimulateMsgPurchaseShield

func SimulateMsgPurchaseShield(k keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper) simtypes.Operation

SimulateMsgPurchaseShield generates a MsgPurchaseShield object with all of its fields randomized.

func SimulateMsgStakeForShield

func SimulateMsgStakeForShield(k keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper) simtypes.Operation

SimulateMsgStakeForShield generates a MsgPurchaseShield object with all of its fields randomized.

func SimulateMsgUnstakeFromShield

func SimulateMsgUnstakeFromShield(k keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper) simtypes.Operation

SimulateMsgUnstakeFromShield generates a MsgUnstakeFromShield object with all of its fields randomized.

func SimulateMsgUpdatePool

SimulateMsgUpdatePool generates a MsgUpdatePool object with all of its fields randomized.

func SimulateMsgWithdrawCollateral

func SimulateMsgWithdrawCollateral(k keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper) simtypes.Operation

SimulateMsgWithdrawCollateral generates a MsgWithdrawCollateral object with all of its fields randomized.

func SimulateMsgWithdrawReimbursement

func SimulateMsgWithdrawReimbursement(k keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper) simtypes.Operation

SimulateMsgWithdrawReimbursement generates a MsgWithdrawReimbursement object with randomized fields.

func SimulateMsgWithdrawRewards

func SimulateMsgWithdrawRewards(k keeper.Keeper, ak types.AccountKeeper) simtypes.Operation

SimulateMsgWithdrawRewards generates a MsgWithdrawRewards object with all of its fields randomized.

func SimulateShieldClaimProposalContent

func SimulateShieldClaimProposalContent(k keeper.Keeper, sk types.StakingKeeper) simtypes.ContentSimulatorFn

SimulateShieldClaimProposalContent generates random shield claim proposal content

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