simulation

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgCreateStream            = "op_weight_msg_create_stream"
	OpWeightMsgClaimStream             = "op_weight_msg_claim_stream"
	OpWeightMsgTopUpDeposit            = "op_weight_msg_top_up_deposit"
	OpWeightMsgUpdateFlowRate          = "op_weight_msg_update_flow_rate"
	OpWeightMsgCancelStream            = "op_weight_msg_cancel_stream"
	DefaultWeightMsgCreateStream   int = 100
	DefaultWeightMsgClaimStream    int = 100
	DefaultWeightMsgTopUpDeposit   int = 100
	DefaultWeightMsgUpdateFlowRate int = 100
	DefaultWeightMsgCancelStream   int = 50
)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgUpdateParams int = 100

	OpWeightMsgUpdateParams = "op_weight_msg_update_params" //nolint:gosec
)

Simulation operation weights constants

View Source
const (
	ValidatorFee = "validator_fee"
)

Simulation parameter constants

Variables

This section is empty.

Functions

func FindAccount

func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool)

FindAccount find a specific address from an account list

func GenValidatorFee

func GenValidatorFee(r *rand.Rand) math.LegacyDec

GenValidatorFee randomized ValidatorFee

func NewDecodeStore

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

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

func ProposalMsgs

func ProposalMsgs() []simtypes.WeightedProposalMsg

ProposalMsgs defines the module weighted proposals' contents

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the stream module.

func SimulateMsgCancelStream

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

SimulateMsgCancelStream generates MsgCancelStream with random values.

func SimulateMsgClaimStream

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

SimulateMsgClaimStream generates MsgClaimStream with random values.

func SimulateMsgCreateStream

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

SimulateMsgCreateStream generates MsgCreateStream with random values.

func SimulateMsgTopUpDeposit

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

SimulateMsgTopUpDeposit generates MsgTopUpDeposit with random values.

func SimulateMsgUpdateFlowRate

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

SimulateMsgUpdateFlowRate generates MsgUpdateFlowRate with random values.

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