simulation

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 19 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 = 100000000000
)

Functions

func DecodeStore

func DecodeStore(cdc *codec.Codec, kvA, kvB tmkv.Pair) string

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

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 added in v1.1.0

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 ParamChanges

func ParamChanges(_ *rand.Rand) []simulation.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

func SimulateMsgCreatePool(k keeper.Keeper, ak types.AccountKeeper, sk types.StakingKeeper) simulation.Operation

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

func SimulateMsgDepositCollateral

func SimulateMsgDepositCollateral(k keeper.Keeper, ak types.AccountKeeper, sk types.StakingKeeper) simulation.Operation

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

func SimulateMsgPurchaseShield

func SimulateMsgPurchaseShield(k keeper.Keeper, ak types.AccountKeeper, sk types.StakingKeeper) simulation.Operation

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

func SimulateMsgStakeForShield added in v1.1.0

func SimulateMsgStakeForShield(k keeper.Keeper, ak types.AccountKeeper, sk types.StakingKeeper) simulation.Operation

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

func SimulateMsgUnstakeFromShield added in v1.1.0

func SimulateMsgUnstakeFromShield(k keeper.Keeper, ak types.AccountKeeper, sk types.StakingKeeper) simulation.Operation

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

func SimulateMsgUpdatePool

func SimulateMsgUpdatePool(k keeper.Keeper, ak types.AccountKeeper, sk types.StakingKeeper) simulation.Operation

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

func SimulateMsgWithdrawCollateral

func SimulateMsgWithdrawCollateral(k keeper.Keeper, ak types.AccountKeeper, sk types.StakingKeeper) simulation.Operation

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

func SimulateMsgWithdrawReimbursement added in v1.1.0

func SimulateMsgWithdrawReimbursement(k keeper.Keeper, ak types.AccountKeeper, sk types.StakingKeeper) simulation.Operation

SimulateMsgWithdrawReimbursement generates a MsgWithdrawReimbursement object with randomized fields.

func SimulateMsgWithdrawRewards

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

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

func SimulateShieldClaimProposalContent

func SimulateShieldClaimProposalContent(k keeper.Keeper, sk types.StakingKeeper) simulation.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